1
00:00:04,180 --> 00:00:09,549
welcome everybody to this webinar we're

2
00:00:07,960 --> 00:00:11,680
going to be talking about numerical

3
00:00:09,549 --> 00:00:14,500
issues and we Furr getting into that

4
00:00:11,680 --> 00:00:18,099
well Robbie's been around for twenty ten

5
00:00:14,500 --> 00:00:19,750
years and the teaming Grobe has over 20

6
00:00:18,099 --> 00:00:22,119
years experience in optimization

7
00:00:19,750 --> 00:00:25,000
problems and a numerical issues for sure

8
00:00:22,119 --> 00:00:27,669
and actually we have built this

9
00:00:25,000 --> 00:00:31,210
experience helping our customers now all

10
00:00:27,669 --> 00:00:34,239
of them use Rob in a daily basis and and

11
00:00:31,210 --> 00:00:37,329
the kind of applications that they solve

12
00:00:34,239 --> 00:00:40,510
it is really wide from accounting to

13
00:00:37,329 --> 00:00:43,510
programming to you really name it and

14
00:00:40,510 --> 00:00:46,510
it's from this experience instead this

15
00:00:43,510 --> 00:00:48,370
webinar is drawing on so let's go to the

16
00:00:46,510 --> 00:00:52,120
global guidelines for numerical issues

17
00:00:48,370 --> 00:00:55,539
or you may say why things go wrong and

18
00:00:52,120 --> 00:00:57,730
more importantly how to avoid it so what

19
00:00:55,539 --> 00:01:00,730
are numerical issues that's probably a

20
00:00:57,730 --> 00:01:03,579
hard thing to say we may say that

21
00:01:00,730 --> 00:01:05,490
actually people talk about numerical

22
00:01:03,579 --> 00:01:08,530
issues whenever they encounter

23
00:01:05,490 --> 00:01:11,140
unexpected results from their algorithms

24
00:01:08,530 --> 00:01:14,080
or even they get inconsistent results

25
00:01:11,140 --> 00:01:17,770
for the same problem and the source of

26
00:01:14,080 --> 00:01:20,710
these are numerous however the most

27
00:01:17,770 --> 00:01:24,250
common ones I will share these for these

28
00:01:20,710 --> 00:01:26,470
are or can be more easily hampered the

29
00:01:24,250 --> 00:01:29,710
first one is rounding which I'm going to

30
00:01:26,470 --> 00:01:32,220
be talking about and then there is the

31
00:01:29,710 --> 00:01:34,600
problem of the big gap between

32
00:01:32,220 --> 00:01:36,130
theoretical numbers and what the

33
00:01:34,600 --> 00:01:38,980
computers actually understand and

34
00:01:36,130 --> 00:01:43,780
represent those numbers and coming from

35
00:01:38,980 --> 00:01:46,480
that gap it's also a common thing for us

36
00:01:43,780 --> 00:01:49,270
to forget that these numbers have limits

37
00:01:46,480 --> 00:01:51,970
and those limits impose to what we can

38
00:01:49,270 --> 00:01:53,920
ask for regarded on precision and

39
00:01:51,970 --> 00:01:57,790
finally we're going to be talking out so

40
00:01:53,920 --> 00:01:59,800
about it conditioning so let's get first

41
00:01:57,790 --> 00:02:03,130
on trying to understand where these

42
00:01:59,800 --> 00:02:05,710
issues come from the first and probably

43
00:02:03,130 --> 00:02:08,170
the easiest one is rounding coefficient

44
00:02:05,710 --> 00:02:11,860
probably this is best explained with an

45
00:02:08,170 --> 00:02:14,109
example and this can really be very very

46
00:02:11,860 --> 00:02:16,569
dangerous so this is a very simple

47
00:02:14,109 --> 00:02:17,680
example I assume that you give the

48
00:02:16,569 --> 00:02:20,230
solver

49
00:02:17,680 --> 00:02:21,760
these two constraints and you may look

50
00:02:20,230 --> 00:02:24,219
at them and you say well you know what

51
00:02:21,760 --> 00:02:26,739
this really looked like the same

52
00:02:24,219 --> 00:02:30,299
constraint and the numbers are

53
00:02:26,739 --> 00:02:33,989
well close to be really one-third that

54
00:02:30,299 --> 00:02:38,469
0.333 could be interpreted as one sir

55
00:02:33,989 --> 00:02:40,629
however we always will interpret the

56
00:02:38,469 --> 00:02:43,450
numbers that you gave the solver asked

57
00:02:40,629 --> 00:02:45,430
the true number and if you do that and

58
00:02:43,450 --> 00:02:47,049
you do the linear algebra on do the

59
00:02:45,430 --> 00:02:49,750
substitution what you will realize is

60
00:02:47,049 --> 00:02:53,980
essentially these two constraints are

61
00:02:49,750 --> 00:02:57,310
really implying that X is one and Y is

62
00:02:53,980 --> 00:02:58,810
zero and this comes from assuming that

63
00:02:57,310 --> 00:03:02,919
the numbers you're creating the solver

64
00:02:58,810 --> 00:03:05,769
are what you really want them to me so

65
00:03:02,919 --> 00:03:08,769
if instead of using this kind of

66
00:03:05,769 --> 00:03:12,099
approximate a fair number you have had

67
00:03:08,769 --> 00:03:14,290
full precision let's say these two

68
00:03:12,099 --> 00:03:16,719
equations a very different story will

69
00:03:14,290 --> 00:03:19,599
have a Rison so essentially you will do

70
00:03:16,719 --> 00:03:22,090
the algebra you do the substitutions and

71
00:03:19,599 --> 00:03:24,970
then you end up with these expression

72
00:03:22,090 --> 00:03:29,229
down here which is 2 times 10 to the

73
00:03:24,970 --> 00:03:31,690
minus 16 times X plus 1 plus the same

74
00:03:29,229 --> 00:03:33,639
coefficient and this is really really

75
00:03:31,690 --> 00:03:35,609
really close to b1 and actually probably

76
00:03:33,639 --> 00:03:38,500
will say well this is one and

77
00:03:35,609 --> 00:03:41,049
essentially what we will do is that drop

78
00:03:38,500 --> 00:03:44,439
one of those two constraints and except

79
00:03:41,049 --> 00:03:47,349
anything that satisfies these linear

80
00:03:44,439 --> 00:03:49,900
constraint as feasible solutions whereas

81
00:03:47,349 --> 00:03:52,479
if you rounded as I showed before you

82
00:03:49,900 --> 00:03:56,109
will be telling the solver only to care

83
00:03:52,479 --> 00:03:58,269
for X 1 and y equals 0 which in most

84
00:03:56,109 --> 00:04:00,489
cases is not what you really want it so

85
00:03:58,269 --> 00:04:03,189
this is very easy to avoid and and and

86
00:04:00,489 --> 00:04:05,349
one thing to look out for errors is

87
00:04:03,189 --> 00:04:08,859
whenever you're feeling the numbers in

88
00:04:05,349 --> 00:04:13,299
model be sure to use the full precision

89
00:04:08,859 --> 00:04:15,400
allowed by the solver which is 16 digits

90
00:04:13,299 --> 00:04:18,009
that's the standard precision I'm going

91
00:04:15,400 --> 00:04:21,009
to get into that and actually probably a

92
00:04:18,009 --> 00:04:25,030
good question to ask yourself well why 2

93
00:04:21,009 --> 00:04:27,039
times 10 to the minus 16 what's so

94
00:04:25,030 --> 00:04:29,620
special about that number why this

95
00:04:27,039 --> 00:04:32,219
global use disregard those numbers and

96
00:04:29,620 --> 00:04:34,419
that brings us to the next

97
00:04:32,219 --> 00:04:37,330
that the real numbers are not really

98
00:04:34,419 --> 00:04:40,179
real at least not in the computer or not

99
00:04:37,330 --> 00:04:41,499
the way computers handle these numbers

100
00:04:40,179 --> 00:04:43,419
so that's what I mean

101
00:04:41,499 --> 00:04:45,069
and there is an easy check for that so

102
00:04:43,419 --> 00:04:48,129
you can open up your Python interpreter

103
00:04:45,069 --> 00:04:51,580
and type that expression and you will

104
00:04:48,129 --> 00:04:53,319
see that you will get a true and look at

105
00:04:51,580 --> 00:04:55,119
it and you say now that that cannot be

106
00:04:53,319 --> 00:04:58,449
true but that's what the computer is

107
00:04:55,119 --> 00:05:01,509
saying well you may think this is coming

108
00:04:58,449 --> 00:05:04,180
from this is really tiny number so maybe

109
00:05:01,509 --> 00:05:07,360
it's not so wrong to assume that is that

110
00:05:04,180 --> 00:05:09,249
expression is almost one but surely it

111
00:05:07,360 --> 00:05:12,249
is huge numbers that shouldn't happen

112
00:05:09,249 --> 00:05:14,229
but that's not true either so if you do

113
00:05:12,249 --> 00:05:17,979
these other experiments right now I have

114
00:05:14,229 --> 00:05:21,999
10 to the 16 plus 1 I compare it to 10

115
00:05:17,979 --> 00:05:25,089
to the 16 again Python will say that's

116
00:05:21,999 --> 00:05:28,509
true that's really strange is those are

117
00:05:25,089 --> 00:05:32,110
not really small numbers to make a long

118
00:05:28,509 --> 00:05:34,990
story short this has nothing to do with

119
00:05:32,110 --> 00:05:38,789
Python really this will be truly tested

120
00:05:34,990 --> 00:05:41,379
in Excel in our in C in Java whatever

121
00:05:38,789 --> 00:05:45,219
programming language that you use if you

122
00:05:41,379 --> 00:05:47,769
use the standard provided floating-point

123
00:05:45,219 --> 00:05:51,699
numbers underneath these expressions

124
00:05:47,769 --> 00:05:54,789
will always hold true and it get worse

125
00:05:51,699 --> 00:05:58,089
really so given these limitations I mean

126
00:05:54,789 --> 00:06:00,309
these kind of comparisons then not even

127
00:05:58,089 --> 00:06:02,649
the basic algebra rules that we learn in

128
00:06:00,309 --> 00:06:05,469
school are true anymore so not even

129
00:06:02,649 --> 00:06:08,439
associativity like here so if I add one

130
00:06:05,469 --> 00:06:10,899
plus the tiny quantity and then again

131
00:06:08,439 --> 00:06:12,969
the tiny quantity that's not the same as

132
00:06:10,899 --> 00:06:14,800
first adding these two tiny quantities

133
00:06:12,969 --> 00:06:18,849
and then one this is not people

134
00:06:14,800 --> 00:06:21,729
so really numbers storing the computer

135
00:06:18,849 --> 00:06:23,740
using they'd standard hardware it's not

136
00:06:21,729 --> 00:06:27,430
what we expected or what we learned to

137
00:06:23,740 --> 00:06:31,869
do with numbers in high school and I'm

138
00:06:27,430 --> 00:06:35,589
sure there are ways around it just to

139
00:06:31,869 --> 00:06:39,519
mention some of them gene UMP is one way

140
00:06:35,589 --> 00:06:42,370
around it there are other tools but all

141
00:06:39,519 --> 00:06:44,589
these tools rely on software base

142
00:06:42,370 --> 00:06:44,960
implementations or handing out numbers

143
00:06:44,589 --> 00:06:47,000
and

144
00:06:44,960 --> 00:06:50,270
those can be very slow and I'm going to

145
00:06:47,000 --> 00:06:53,240
be talking a bit about that and actually

146
00:06:50,270 --> 00:06:56,630
you can expect where these limits come

147
00:06:53,240 --> 00:06:58,910
from in Python you can say import system

148
00:06:56,630 --> 00:07:01,430
and then print the floating information

149
00:06:58,910 --> 00:07:06,020
and you'll see there is this quantity

150
00:07:01,430 --> 00:07:09,169
down here epsilon that is 2 on all those

151
00:07:06,020 --> 00:07:11,509
and the numbers times 10 to the minus 16

152
00:07:09,169 --> 00:07:14,500
and what's that epsilon that's the

153
00:07:11,509 --> 00:07:16,759
smallest number that you can add to one

154
00:07:14,500 --> 00:07:19,639
and still distinguish it from one

155
00:07:16,759 --> 00:07:23,120
anything below that and one won't be

156
00:07:19,639 --> 00:07:26,810
able to register in the computer numbers

157
00:07:23,120 --> 00:07:29,419
and we use and as I said there is no way

158
00:07:26,810 --> 00:07:31,070
around this and that's what I mean by

159
00:07:29,419 --> 00:07:35,539
real numbers none being real at least

160
00:07:31,070 --> 00:07:38,000
not in the computer so that really means

161
00:07:35,539 --> 00:07:41,270
that we have to be very careful on how

162
00:07:38,000 --> 00:07:44,030
we do arithmetic cela computer now let

163
00:07:41,270 --> 00:07:47,030
me explain a bit more about this so what

164
00:07:44,030 --> 00:07:50,710
does this mean most peripherals provide

165
00:07:47,030 --> 00:07:52,940
a cheap base implementation of these

166
00:07:50,710 --> 00:07:56,120
floating-point numbers these kind of

167
00:07:52,940 --> 00:07:59,449
approximation of real numbers and this

168
00:07:56,120 --> 00:08:02,300
hardware is really really key to get

169
00:07:59,449 --> 00:08:04,130
good performance I mean this using the

170
00:08:02,300 --> 00:08:06,590
hardware base floating-point numbers

171
00:08:04,130 --> 00:08:09,080
it's 10 100 and sometimes even a

172
00:08:06,590 --> 00:08:11,120
thousand times faster then you use

173
00:08:09,080 --> 00:08:14,419
seeing any of the standard extended

174
00:08:11,120 --> 00:08:17,900
precision around there so if you really

175
00:08:14,419 --> 00:08:20,509
care about performance you should deal

176
00:08:17,900 --> 00:08:24,199
with these numbers under limit and

177
00:08:20,509 --> 00:08:26,719
that's what GU Ruby does we use in

178
00:08:24,199 --> 00:08:30,229
almost all code these double precision

179
00:08:26,719 --> 00:08:32,089
64-bit numbers and this is not too bad

180
00:08:30,229 --> 00:08:35,180
actually I'm going to show you that

181
00:08:32,089 --> 00:08:38,209
although these numbers are limits if use

182
00:08:35,180 --> 00:08:43,279
within reason they do provide meaningful

183
00:08:38,209 --> 00:08:45,850
answers 99.999 percent of the time there

184
00:08:43,279 --> 00:08:50,149
is also this last part which is very key

185
00:08:45,850 --> 00:08:53,720
since these numbers don't really satisfy

186
00:08:50,149 --> 00:08:56,060
so should he be adding up is not really

187
00:08:53,720 --> 00:08:58,640
an exact operation

188
00:08:56,060 --> 00:09:00,440
whenever you're testing if I mean

189
00:08:58,640 --> 00:09:03,170
while their own equation holds you

190
00:09:00,440 --> 00:09:05,780
cannot really test for equality of the

191
00:09:03,170 --> 00:09:07,880
expressions you have to take into

192
00:09:05,780 --> 00:09:11,510
account that there might be some

193
00:09:07,880 --> 00:09:12,530
rounding error going on and what do we

194
00:09:11,510 --> 00:09:15,410
do to handle that

195
00:09:12,530 --> 00:09:19,070
well that's Torrance's and user scale

196
00:09:15,410 --> 00:09:21,230
and this is key to understand so what

197
00:09:19,070 --> 00:09:23,240
will guru be do we always as I said

198
00:09:21,230 --> 00:09:27,260
before when we were talking about these

199
00:09:23,240 --> 00:09:31,100
rounding issues we always trust numbers

200
00:09:27,260 --> 00:09:33,590
that you keep so for example if somehow

201
00:09:31,100 --> 00:09:35,870
in your model you write 1 plus 10 to the

202
00:09:33,590 --> 00:09:41,180
minus 7 times X less than or equal to 1

203
00:09:35,870 --> 00:09:42,740
with X being binary results may detect

204
00:09:41,180 --> 00:09:45,410
this expression because it couldn't be

205
00:09:42,740 --> 00:09:49,150
hidden and decided well that implies

206
00:09:45,410 --> 00:09:52,070
that X must be 0 which is a correct

207
00:09:49,150 --> 00:09:55,760
implication from what the input that you

208
00:09:52,070 --> 00:09:58,820
gave the server is however I have to

209
00:09:55,760 --> 00:10:01,190
make an emphasis that this may happen

210
00:09:58,820 --> 00:10:03,260
and why may happen and it doesn't happen

211
00:10:01,190 --> 00:10:06,140
all the time well because during resolve

212
00:10:03,260 --> 00:10:08,660
or even by cutting planes we have to

213
00:10:06,140 --> 00:10:11,510
limit how much time we invest in trying

214
00:10:08,660 --> 00:10:14,180
to detect this kind of stuff so not all

215
00:10:11,510 --> 00:10:15,800
the time we will be performing an

216
00:10:14,180 --> 00:10:17,990
exhaustive search and all the

217
00:10:15,800 --> 00:10:21,880
implications hidden in the model and

218
00:10:17,990 --> 00:10:27,290
that's why it may be comforting to this

219
00:10:21,880 --> 00:10:30,230
however when you solve the model and you

220
00:10:27,290 --> 00:10:33,320
get a feasible solution you have to

221
00:10:30,230 --> 00:10:35,750
check if that solution is feasible but

222
00:10:33,320 --> 00:10:37,910
as I said before you cannot really check

223
00:10:35,750 --> 00:10:40,940
for equality on the constraint and you

224
00:10:37,910 --> 00:10:43,520
need to introduce the idea of tolerances

225
00:10:40,940 --> 00:10:45,860
so whenever we have a feasible solution

226
00:10:43,520 --> 00:10:48,320
produced by any race they go by solving

227
00:10:45,860 --> 00:10:51,050
a linear system there are at least three

228
00:10:48,320 --> 00:10:53,420
things that we have to check one is

229
00:10:51,050 --> 00:10:57,080
deciding if a given solution is integer

230
00:10:53,420 --> 00:10:59,470
or not and what we do is that we define

231
00:10:57,080 --> 00:11:02,650
this tolerance called the inter-facility

232
00:10:59,470 --> 00:11:08,030
tolerance to decide whether a given

233
00:11:02,650 --> 00:11:09,360
quantity is interior enough the same

234
00:11:08,030 --> 00:11:11,940
applies to

235
00:11:09,360 --> 00:11:14,279
I'm a feasibility whenever we have to

236
00:11:11,940 --> 00:11:17,850
check that an inequality or an equation

237
00:11:14,279 --> 00:11:21,290
actually is satisfied we don't test for

238
00:11:17,850 --> 00:11:25,529
equality here we always allow a little

239
00:11:21,290 --> 00:11:28,680
wiggle room to say and again whenever

240
00:11:25,529 --> 00:11:31,829
you are checking for a certificate of

241
00:11:28,680 --> 00:11:34,500
dual optimality the same happens the

242
00:11:31,829 --> 00:11:36,810
dual space and that is called the

243
00:11:34,500 --> 00:11:38,910
optimality tolerance and those are three

244
00:11:36,810 --> 00:11:44,130
different quantities that actually you

245
00:11:38,910 --> 00:11:48,089
can move a bit so well does this mean

246
00:11:44,130 --> 00:11:51,000
and this is very subtle so let me try to

247
00:11:48,089 --> 00:11:54,750
be very careful with what I say first

248
00:11:51,000 --> 00:11:57,620
the tolerances that I was describing for

249
00:11:54,750 --> 00:12:00,420
there are absolute quantities they won't

250
00:11:57,620 --> 00:12:03,209
change depending on the input numbers

251
00:12:00,420 --> 00:12:06,029
that you give so if you change the scale

252
00:12:03,209 --> 00:12:08,459
of a constrain or if a variable the

253
00:12:06,029 --> 00:12:10,980
meaning in terms of these Torrance's we

254
00:12:08,459 --> 00:12:12,839
change and you have to be careful about

255
00:12:10,980 --> 00:12:16,519
that I'm going to talk a bit more about

256
00:12:12,839 --> 00:12:19,350
it it also means that you may have a

257
00:12:16,519 --> 00:12:23,070
feasible solution that satisfied the set

258
00:12:19,350 --> 00:12:25,380
tolerance that I said before but even

259
00:12:23,070 --> 00:12:28,519
having a solution that violates use

260
00:12:25,380 --> 00:12:31,920
let's say by 10 to the minus 7 a

261
00:12:28,519 --> 00:12:34,230
constrained pre-sold or even a cutting

262
00:12:31,920 --> 00:12:36,720
plane may decide at some intermediate

263
00:12:34,230 --> 00:12:39,930
state on the algorithm to cut it off and

264
00:12:36,720 --> 00:12:43,410
to mark that solution as infeasible and

265
00:12:39,930 --> 00:12:46,110
why that can be troublesome well because

266
00:12:43,410 --> 00:12:49,740
it means that at least for models where

267
00:12:46,110 --> 00:12:53,190
the numerix are challenging the optimal

268
00:12:49,740 --> 00:12:58,140
value may change depending on the part

269
00:12:53,190 --> 00:13:00,180
of the argument age so essentially what

270
00:12:58,140 --> 00:13:01,980
this means is that these tolerances

271
00:13:00,180 --> 00:13:05,310
especially for problems were is hard to

272
00:13:01,980 --> 00:13:06,240
get accurate solutions imply that there

273
00:13:05,310 --> 00:13:09,990
is a gray zone

274
00:13:06,240 --> 00:13:12,000
there is a grey zone of solutions that

275
00:13:09,990 --> 00:13:14,130
may be considered feasible in some

276
00:13:12,000 --> 00:13:17,190
situations but in some other situations

277
00:13:14,130 --> 00:13:19,560
may be considered infeasible where as

278
00:13:17,190 --> 00:13:22,920
whatever is strictly feasible will

279
00:13:19,560 --> 00:13:23,370
remain feasible always and then outside

280
00:13:22,920 --> 00:13:25,200
that

281
00:13:23,370 --> 00:13:28,890
torence region then things will be

282
00:13:25,200 --> 00:13:32,550
considered infeasible so whenever the

283
00:13:28,890 --> 00:13:35,160
problem has a big gray area that's the

284
00:13:32,550 --> 00:13:38,850
case where you're observing numerical

285
00:13:35,160 --> 00:13:41,310
issues with your mother so how bad is

286
00:13:38,850 --> 00:13:43,650
really this because I mean up to now

287
00:13:41,310 --> 00:13:46,230
this is sounding really really bad

288
00:13:43,650 --> 00:13:48,540
however people use optimization very

289
00:13:46,230 --> 00:13:51,060
often and it's not that common for them

290
00:13:48,540 --> 00:13:53,460
to get into issues so how come there

291
00:13:51,060 --> 00:13:55,370
must be something going on in here and

292
00:13:53,460 --> 00:13:59,940
indeed there is

293
00:13:55,370 --> 00:14:02,279
so first the fault tolerance that we use

294
00:13:59,940 --> 00:14:05,130
in grub is 10 to the minus 6 for primal

295
00:14:02,279 --> 00:14:08,430
and dual feasibility and for integral it

296
00:14:05,130 --> 00:14:10,710
is 10 to the minus 5 and let's say that

297
00:14:08,430 --> 00:14:13,140
you defined your model and your right

298
00:14:10,710 --> 00:14:17,300
hand size are in the order of 10 to the

299
00:14:13,140 --> 00:14:20,880
4 10 to the 3 it means that the gray so

300
00:14:17,300 --> 00:14:22,410
the area where you may have some

301
00:14:20,880 --> 00:14:23,940
solution to be treated sometimes

302
00:14:22,410 --> 00:14:26,550
feasible and sometimes is infeasible

303
00:14:23,940 --> 00:14:29,339
it's really tiny is use around 10 to the

304
00:14:26,550 --> 00:14:32,190
minus 9 or 1 in a billion so that's

305
00:14:29,339 --> 00:14:33,000
really really really small and for most

306
00:14:32,190 --> 00:14:35,459
problems

307
00:14:33,000 --> 00:14:38,700
that's just insignificant so that gray

308
00:14:35,459 --> 00:14:40,620
area doesn't play any role and that's

309
00:14:38,700 --> 00:14:44,400
why I said that the scaling is key

310
00:14:40,620 --> 00:14:47,160
because you are the one who choose how

311
00:14:44,400 --> 00:14:49,440
big is going to be the coefficients your

312
00:14:47,160 --> 00:14:52,890
constraint or how big are the ranges in

313
00:14:49,440 --> 00:14:56,160
your variables also this means since the

314
00:14:52,890 --> 00:14:58,770
tolerance as I said before are absolute

315
00:14:56,160 --> 00:15:02,820
and not relative if you have constraints

316
00:14:58,770 --> 00:15:05,730
with very small active ranges the solver

317
00:15:02,820 --> 00:15:07,920
may consider them juice to be an

318
00:15:05,730 --> 00:15:10,790
equation and the changes that you're

319
00:15:07,920 --> 00:15:13,470
expecting to see let's say if the

320
00:15:10,790 --> 00:15:16,950
solutions moving the range of 10 to the

321
00:15:13,470 --> 00:15:21,660
minus 9 and 10 to the minus 10 then that

322
00:15:16,950 --> 00:15:24,810
is just not being seen by the solver so

323
00:15:21,660 --> 00:15:27,090
you should also try to avoid

324
00:15:24,810 --> 00:15:30,630
ranges for constraint are just too small

325
00:15:27,090 --> 00:15:35,340
unless they are really equations

326
00:15:30,630 --> 00:15:38,280
okay so what about variables because

327
00:15:35,340 --> 00:15:40,970
this was talking about constraints so

328
00:15:38,280 --> 00:15:43,800
the same really applies to variables

329
00:15:40,970 --> 00:15:46,110
ranges for variables shouldn't also be

330
00:15:43,800 --> 00:15:48,540
to be for the same reason because the

331
00:15:46,110 --> 00:15:51,390
bounds are again primal constraints

332
00:15:48,540 --> 00:15:54,000
although we treat them differently you

333
00:15:51,390 --> 00:15:56,880
should also be careful not to have wide

334
00:15:54,000 --> 00:15:58,980
range of primal variables and also for

335
00:15:56,880 --> 00:16:01,350
interior variables I mean if you have an

336
00:15:58,980 --> 00:16:03,810
entire variable with really wide ranges

337
00:16:01,350 --> 00:16:05,520
let's say I'm million maybe you should

338
00:16:03,810 --> 00:16:08,250
reconsider treating them as a linear

339
00:16:05,520 --> 00:16:10,440
maybe their use continues especially if

340
00:16:08,250 --> 00:16:13,920
that's kind of the range where they move

341
00:16:10,440 --> 00:16:16,380
I mean just a unit change here in the

342
00:16:13,920 --> 00:16:18,660
order of the millions won't change much

343
00:16:16,380 --> 00:16:21,750
but you will be paying the price of

344
00:16:18,660 --> 00:16:25,730
forcing this over to work harder to find

345
00:16:21,750 --> 00:16:28,230
kind of an intercession for those ranges

346
00:16:25,730 --> 00:16:31,320
what about the objective function so

347
00:16:28,230 --> 00:16:35,370
again the same applies because remember

348
00:16:31,320 --> 00:16:37,440
whenever you are looking at feasible

349
00:16:35,370 --> 00:16:40,230
solutions you hold so how to check the

350
00:16:37,440 --> 00:16:44,700
duality conditions really stay that the

351
00:16:40,230 --> 00:16:48,150
giving help resolve is optimal so what I

352
00:16:44,700 --> 00:16:50,310
recommend is to deal your problem so

353
00:16:48,150 --> 00:16:53,280
that the optimal solution is in the

354
00:16:50,310 --> 00:16:56,070
range of either minus 10 to the 4 or 10

355
00:16:53,280 --> 00:16:58,740
to the 4 otherwise what you're doing is

356
00:16:56,070 --> 00:17:01,350
really pushing the dual feasibility so

357
00:16:58,740 --> 00:17:05,220
let's say you're talking about billions

358
00:17:01,350 --> 00:17:07,589
of dollars a good idea will be to change

359
00:17:05,220 --> 00:17:09,810
the units in your elective function to

360
00:17:07,589 --> 00:17:13,230
talk about thousands or maybe 10

361
00:17:09,810 --> 00:17:16,110
thousands of dollars instead of I know

362
00:17:13,230 --> 00:17:18,089
using iron dollars or cents which will

363
00:17:16,110 --> 00:17:21,630
make the objective function blow up and

364
00:17:18,089 --> 00:17:23,430
make everything really harder also for

365
00:17:21,630 --> 00:17:26,069
the same reasons that you don't want to

366
00:17:23,430 --> 00:17:28,620
have constraints with very small ranges

367
00:17:26,069 --> 00:17:31,980
you should also try to avoid objective

368
00:17:28,620 --> 00:17:34,830
functions that are really tiny so if

369
00:17:31,980 --> 00:17:37,650
your problem does have a meaningful

370
00:17:34,830 --> 00:17:39,750
objective function what I will recommend

371
00:17:37,650 --> 00:17:43,410
is to either make it strictly bigger

372
00:17:39,750 --> 00:17:44,160
than 1 or relieve all of that minus 1

373
00:17:43,410 --> 00:17:47,070
and

374
00:17:44,160 --> 00:17:50,610
is to move away from zero again because

375
00:17:47,070 --> 00:17:53,610
then there is a better handling of the

376
00:17:50,610 --> 00:17:55,260
coefficients on the dual side and the

377
00:17:53,610 --> 00:17:56,910
only exception for this is when your

378
00:17:55,260 --> 00:17:59,460
problem is really a feasibility problem

379
00:17:56,910 --> 00:18:02,190
in which case all the coefficients in

380
00:17:59,460 --> 00:18:05,640
the objective can be zero and that won't

381
00:18:02,190 --> 00:18:08,070
hurt performance at all actually and not

382
00:18:05,640 --> 00:18:11,370
all these is not too hard to achieve

383
00:18:08,070 --> 00:18:13,770
it's really just changing the scaling in

384
00:18:11,370 --> 00:18:16,740
your roses change essentially changing

385
00:18:13,770 --> 00:18:19,430
the units on how you measure the DVDs in

386
00:18:16,740 --> 00:18:22,920
your rows and also in the columns and

387
00:18:19,430 --> 00:18:25,860
also in objective function however as I

388
00:18:22,920 --> 00:18:26,220
said before Ruby will not do these for

389
00:18:25,860 --> 00:18:29,280
you

390
00:18:26,220 --> 00:18:32,880
it's after the user really to define

391
00:18:29,280 --> 00:18:36,300
what's the right range for all these

392
00:18:32,880 --> 00:18:39,650
quantities so how did you get tight

393
00:18:36,300 --> 00:18:42,120
ranges for constraints and variables

394
00:18:39,650 --> 00:18:46,950
probably the first thing that you should

395
00:18:42,120 --> 00:18:50,490
try is to use other information not

396
00:18:46,950 --> 00:18:53,340
available in the model to impose tighter

397
00:18:50,490 --> 00:18:55,800
bounds either in constraints or in

398
00:18:53,340 --> 00:18:59,790
variables so let's say I know I'm trying

399
00:18:55,800 --> 00:19:02,910
to plan providing a service of dispatch

400
00:18:59,790 --> 00:19:07,230
and delivery I'm in principle I could

401
00:19:02,910 --> 00:19:09,750
have any quantity of trucks however I

402
00:19:07,230 --> 00:19:11,910
know because I know the business that I

403
00:19:09,750 --> 00:19:14,160
am only considering three possible

404
00:19:11,910 --> 00:19:15,810
locations to store the tracks and those

405
00:19:14,160 --> 00:19:18,930
locations won't handle more than a

406
00:19:15,810 --> 00:19:20,880
hundred trucks so you can give that

407
00:19:18,930 --> 00:19:24,390
piece of information to the solver and

408
00:19:20,880 --> 00:19:27,180
the server will use that information to

409
00:19:24,390 --> 00:19:30,060
really prune both the search and make

410
00:19:27,180 --> 00:19:32,520
everything much faster and if you think

411
00:19:30,060 --> 00:19:35,610
about it a little bit if you don't give

412
00:19:32,520 --> 00:19:37,800
that information solver the solver has

413
00:19:35,610 --> 00:19:39,690
to consider the possibility of going

414
00:19:37,800 --> 00:19:43,670
beyond although you won't have any use

415
00:19:39,690 --> 00:19:46,620
for that solution if it's relevant so

416
00:19:43,670 --> 00:19:49,410
the first thing and most important is

417
00:19:46,620 --> 00:19:52,290
try to get whatever extra information

418
00:19:49,410 --> 00:19:55,220
you have at hand to get tied bounds on

419
00:19:52,290 --> 00:19:58,820
your variables after that

420
00:19:55,220 --> 00:20:01,040
change units from towns 2,000 tons let's

421
00:19:58,820 --> 00:20:04,000
say or from dollars to thousands of

422
00:20:01,040 --> 00:20:07,880
dollars all the time try to choose the

423
00:20:04,000 --> 00:20:09,860
proper units so that the range of

424
00:20:07,880 --> 00:20:13,130
constraints and variables is not too

425
00:20:09,860 --> 00:20:16,610
large were too large I mean hopefully

426
00:20:13,130 --> 00:20:21,050
not beyond 10 to the 4 and finally there

427
00:20:16,610 --> 00:20:23,900
is a common use case on where you can

428
00:20:21,050 --> 00:20:25,330
get very big and small coefficients in

429
00:20:23,900 --> 00:20:28,310
the objective function and that's what

430
00:20:25,330 --> 00:20:30,200
people do when they are really trying to

431
00:20:28,310 --> 00:20:33,010
do hierarchical multi objective

432
00:20:30,200 --> 00:20:35,690
optimization they will blend all these

433
00:20:33,010 --> 00:20:37,490
different objectives with huge

434
00:20:35,690 --> 00:20:39,140
coefficients for the most important

435
00:20:37,490 --> 00:20:40,700
objectives and then with smaller

436
00:20:39,140 --> 00:20:43,580
coefficients for the less important

437
00:20:40,700 --> 00:20:45,320
objectives so that will naturally two

438
00:20:43,580 --> 00:20:48,100
huge clear pitch in the objective

439
00:20:45,320 --> 00:20:50,210
function however now Grobe supports

440
00:20:48,100 --> 00:20:53,060
internally this multi objective

441
00:20:50,210 --> 00:20:56,330
optimization where each objective now

442
00:20:53,060 --> 00:20:59,660
can have reasonable values reasonable

443
00:20:56,330 --> 00:21:04,880
coefficients and everything believe me

444
00:20:59,660 --> 00:21:09,290
will be much easier to follow so let me

445
00:21:04,880 --> 00:21:12,530
try to stress why scaling is relevant

446
00:21:09,290 --> 00:21:14,900
what I'm going to do is an experiment a

447
00:21:12,530 --> 00:21:17,300
quick experiment actually so what I'm

448
00:21:14,900 --> 00:21:19,820
going to take is like a problem and then

449
00:21:17,300 --> 00:21:21,950
I'm going to randomly rescale the

450
00:21:19,820 --> 00:21:25,070
columns of the problems so that the

451
00:21:21,950 --> 00:21:29,240
optimal value in theory doesn't change

452
00:21:25,070 --> 00:21:32,120
so I'm going to change the objective and

453
00:21:29,240 --> 00:21:35,180
the coefficients here and then decrease

454
00:21:32,120 --> 00:21:37,660
the bounds if they are finite okay I'm

455
00:21:35,180 --> 00:21:40,670
going to do that within our range

456
00:21:37,660 --> 00:21:42,470
coefficient and I'm going to run this

457
00:21:40,670 --> 00:21:43,370
script you'll get this script so you can

458
00:21:42,470 --> 00:21:46,730
look at it later on

459
00:21:43,370 --> 00:21:48,740
this is our common problem and this

460
00:21:46,730 --> 00:21:52,100
means that I'm going to scale the

461
00:21:48,740 --> 00:21:55,190
columns with a factor up to of one that

462
00:21:52,100 --> 00:21:57,260
it could be smaller randomly and then I

463
00:21:55,190 --> 00:21:59,660
let grow be optimized the resulting

464
00:21:57,260 --> 00:22:01,040
model and what you see is right away is

465
00:21:59,660 --> 00:22:03,650
you get this warning I mean the

466
00:22:01,040 --> 00:22:05,870
coefficients are to be actually here you

467
00:22:03,650 --> 00:22:07,460
see here Tina's order of magnitude

468
00:22:05,870 --> 00:22:08,060
difference between the smallest and the

469
00:22:07,460 --> 00:22:09,120
largest

470
00:22:08,060 --> 00:22:13,620
that's hardly nards

471
00:22:09,120 --> 00:22:16,950
but Robbie goes on work a bit and he

472
00:22:13,620 --> 00:22:20,580
finds the solution about a thousand

473
00:22:16,950 --> 00:22:23,520
iterations and the value is 4.49 III

474
00:22:20,580 --> 00:22:27,780
something like that okay it wasn't too

475
00:22:23,520 --> 00:22:31,370
bad but if I now scale the problem with

476
00:22:27,780 --> 00:22:35,460
a bigger coefficient so up to a thousand

477
00:22:31,370 --> 00:22:38,070
well you see now the matrix coefficient

478
00:22:35,460 --> 00:22:41,160
range and it grew now it's 18 orders of

479
00:22:38,070 --> 00:22:44,870
magnitude you see again the warning and

480
00:22:41,160 --> 00:22:49,260
now we are still getting the same

481
00:22:44,870 --> 00:22:52,340
optimal value however and this is key it

482
00:22:49,260 --> 00:22:56,550
took longer in numbers of iterations and

483
00:22:52,340 --> 00:22:59,730
what if I push it even more well I can

484
00:22:56,550 --> 00:23:01,890
push it now to let's say a million

485
00:22:59,730 --> 00:23:04,290
I mean scaling coefficients for up to a

486
00:23:01,890 --> 00:23:08,040
million the matrix range is really crazy

487
00:23:04,290 --> 00:23:12,179
now Robbie will do sting and still is

488
00:23:08,040 --> 00:23:14,130
able to get the optimal value to longer

489
00:23:12,179 --> 00:23:17,390
but now you're getting these extra

490
00:23:14,130 --> 00:23:20,840
warning what is saying is saying that

491
00:23:17,390 --> 00:23:23,850
although he tried really hard to manage

492
00:23:20,840 --> 00:23:26,610
violations when he unscaled

493
00:23:23,850 --> 00:23:29,429
or when he finished the process of doing

494
00:23:26,610 --> 00:23:33,090
depreciation he couldn't find a solution

495
00:23:29,429 --> 00:23:35,790
with a small primer or do violations so

496
00:23:33,090 --> 00:23:38,010
in this case it's really extreme still

497
00:23:35,790 --> 00:23:40,080
got the objective function right took

498
00:23:38,010 --> 00:23:43,559
longer in number of iterations but

499
00:23:40,080 --> 00:23:45,540
couldn't find a nice solution with small

500
00:23:43,559 --> 00:23:48,059
violations and it's no surprise I mean

501
00:23:45,540 --> 00:23:51,900
you are scaling for up to a million what

502
00:23:48,059 --> 00:23:55,770
if I push it even further well if I go

503
00:23:51,900 --> 00:23:57,600
all the way to 100 millions or rescaling

504
00:23:55,770 --> 00:24:00,870
columns now the problems really break

505
00:23:57,600 --> 00:24:04,140
down so Rob is not able to solve them

506
00:24:00,870 --> 00:24:05,480
all the carry to be invisible and this

507
00:24:04,140 --> 00:24:09,559
has to do

508
00:24:05,480 --> 00:24:12,230
that decided Roby we trust the numbers

509
00:24:09,559 --> 00:24:15,080
that you were giving so in theory if the

510
00:24:12,230 --> 00:24:16,850
numbers were pure scaling columns

511
00:24:15,080 --> 00:24:19,549
shouldn't change anything

512
00:24:16,850 --> 00:24:22,490
however since numbers are storing this

513
00:24:19,549 --> 00:24:24,049
finite precision being when you rescale

514
00:24:22,490 --> 00:24:26,720
the problem you're really changing the

515
00:24:24,049 --> 00:24:30,020
definition of it and you are risking

516
00:24:26,720 --> 00:24:32,540
even getting unfeasible solutions and

517
00:24:30,020 --> 00:24:35,390
also please remember I mean as we were

518
00:24:32,540 --> 00:24:37,700
increasing the scaling range essentially

519
00:24:35,390 --> 00:24:39,740
making the problem harder to solve the

520
00:24:37,700 --> 00:24:42,440
first time scrubby was able to solve

521
00:24:39,740 --> 00:24:44,929
economy anyway but but the price that

522
00:24:42,440 --> 00:24:45,470
you pay for that it's extra computing

523
00:24:44,929 --> 00:24:48,710
time

524
00:24:45,470 --> 00:24:52,419
so again rescaled your problem may

525
00:24:48,710 --> 00:24:56,330
actually result in a faster optimization

526
00:24:52,419 --> 00:24:59,299
so what else can you do to handle these

527
00:24:56,330 --> 00:25:02,450
issues so one thing that you can do is

528
00:24:59,299 --> 00:25:04,309
actually do a combination of row and

529
00:25:02,450 --> 00:25:06,200
column scaling to get better

530
00:25:04,309 --> 00:25:07,790
coordination so let me explain this with

531
00:25:06,200 --> 00:25:11,720
an example so let's say that I have this

532
00:25:07,790 --> 00:25:16,370
problem I have 10 to the minus 7 X plus

533
00:25:11,720 --> 00:25:17,059
y and X + 3 Z less than or equal to 10

534
00:25:16,370 --> 00:25:21,320
to the 4

535
00:25:17,059 --> 00:25:24,650
what I can do is replace X with 10 to

536
00:25:21,320 --> 00:25:27,440
the 4 X Prime and then I get this

537
00:25:24,650 --> 00:25:31,280
constraint on top but later on what I

538
00:25:27,440 --> 00:25:34,910
can also do I mean I can simplify this

539
00:25:31,280 --> 00:25:40,400
constraint and instead of having 10 to

540
00:25:34,910 --> 00:25:42,700
the 4 X prime here and then to the 3 Z

541
00:25:40,400 --> 00:25:46,490
and then to before here I have this

542
00:25:42,700 --> 00:25:49,940
simpler expression so by combining I

543
00:25:46,490 --> 00:25:51,860
move from a world where I had 10 order

544
00:25:49,940 --> 00:25:56,200
of magnitudes of difference in the

545
00:25:51,860 --> 00:25:59,690
coefficient matrix to only 4 which is

546
00:25:56,200 --> 00:26:02,390
better but not only that I mean since

547
00:25:59,690 --> 00:26:05,210
the precision and the tolerance is

548
00:26:02,390 --> 00:26:07,490
absolute as I was saying before actually

549
00:26:05,210 --> 00:26:09,590
solving the system with this constraint

550
00:26:07,490 --> 00:26:12,950
with scale it down constraint it's

551
00:26:09,590 --> 00:26:15,169
easier than solving the same problem but

552
00:26:12,950 --> 00:26:18,409
with the scale up constraint and why is

553
00:26:15,169 --> 00:26:19,260
that it's because I will still be asking

554
00:26:18,409 --> 00:26:22,950
for a 10 to the

555
00:26:19,260 --> 00:26:25,260
- seeks tolerance in this case whereas

556
00:26:22,950 --> 00:26:27,240
if I ask for a 10 to the -6 tolerance in

557
00:26:25,260 --> 00:26:29,640
this constraint it will be in a sense

558
00:26:27,240 --> 00:26:33,390
easier for the solver to find such X

559
00:26:29,640 --> 00:26:36,510
Prime and Z don't lie to yourself so a

560
00:26:33,390 --> 00:26:39,030
common guideline that we provide is the

561
00:26:36,510 --> 00:26:41,970
range of coefficients in the rows and

562
00:26:39,030 --> 00:26:44,010
colors should be smaller or not to be so

563
00:26:41,970 --> 00:26:46,320
if you encounter this problem it's not

564
00:26:44,010 --> 00:26:49,080
too hard to say oh where I can hide that

565
00:26:46,320 --> 00:26:51,870
six orders of magnitude just having

566
00:26:49,080 --> 00:26:54,930
these equations now everything looks

567
00:26:51,870 --> 00:26:57,690
nice isn't it now instead of having 1

568
00:26:54,930 --> 00:27:00,420
and 10 to the 6 I only have 1 and 10

569
00:26:57,690 --> 00:27:02,910
however you didn't really change the

570
00:27:00,420 --> 00:27:05,520
problem actually the same kind of

571
00:27:02,910 --> 00:27:08,250
epsilon some feasible solutions still

572
00:27:05,520 --> 00:27:10,710
persist in the model and actually Prasad

573
00:27:08,250 --> 00:27:12,900
will detect this and we'll get back into

574
00:27:10,710 --> 00:27:15,150
this original stuff so you're not

575
00:27:12,900 --> 00:27:18,950
changing the problem by doing this trick

576
00:27:15,150 --> 00:27:25,470
what you couldn't do instead of that is

577
00:27:18,950 --> 00:27:28,350
do this so you can change Y by Y prime

578
00:27:25,470 --> 00:27:30,570
where they are related in this form and

579
00:27:28,350 --> 00:27:33,630
now what you will get is essentially if

580
00:27:30,570 --> 00:27:35,430
you push these three orders of

581
00:27:33,630 --> 00:27:37,950
magnitudes here in this coefficient and

582
00:27:35,430 --> 00:27:41,250
you increase now the range of the

583
00:27:37,950 --> 00:27:46,380
variable but the side gain from these is

584
00:27:41,250 --> 00:27:50,310
that now if Y prime is epsilon violative

585
00:27:46,380 --> 00:27:53,760
what you will get in X is really a very

586
00:27:50,310 --> 00:27:56,370
small possible violation of only 10 to

587
00:27:53,760 --> 00:27:58,620
the minus 3 which is really better so

588
00:27:56,370 --> 00:27:59,580
this is improving the numeric I'm the

589
00:27:58,620 --> 00:28:03,030
problem whereas the previous

590
00:27:59,580 --> 00:28:06,240
substitution is not really helping what

591
00:28:03,030 --> 00:28:08,910
about Big M constraints so in principle

592
00:28:06,240 --> 00:28:10,800
is you rescale the meaning of your

593
00:28:08,910 --> 00:28:13,080
constraint of your variables there

594
00:28:10,800 --> 00:28:14,460
shouldn't be any big amps I mean because

595
00:28:13,080 --> 00:28:16,740
the range of the variables will be

596
00:28:14,460 --> 00:28:20,520
willing 10 to the 4 and then everything

597
00:28:16,740 --> 00:28:23,070
will work fine however for some reason

598
00:28:20,520 --> 00:28:26,910
you cannot really get away from those

599
00:28:23,070 --> 00:28:28,020
big constants like here and you cannot

600
00:28:26,910 --> 00:28:31,110
change that

601
00:28:28,020 --> 00:28:32,610
with a by changing this scaling on the

602
00:28:31,110 --> 00:28:35,700
meaning of X

603
00:28:32,610 --> 00:28:38,880
what you can do that will improve

604
00:28:35,700 --> 00:28:41,970
numerical accuracy is to define these

605
00:28:38,880 --> 00:28:44,730
constraints as SOS constraints or or as

606
00:28:41,970 --> 00:28:47,150
a general implication constraints which

607
00:28:44,730 --> 00:28:50,340
was introduced in Robeson point five

608
00:28:47,150 --> 00:28:53,360
however although you will get more

609
00:28:50,340 --> 00:28:56,610
reliable solutions and actually this

610
00:28:53,360 --> 00:29:00,540
implication of Y being zero then X being

611
00:28:56,610 --> 00:29:02,820
0 will be always satisfied the price

612
00:29:00,540 --> 00:29:06,660
that you will be paying is that extra

613
00:29:02,820 --> 00:29:09,150
computing time so it will fix the

614
00:29:06,660 --> 00:29:11,010
problem of numerical stability but the

615
00:29:09,150 --> 00:29:13,530
price you will be paying is more

616
00:29:11,010 --> 00:29:16,410
computing time so don't forget that

617
00:29:13,530 --> 00:29:19,470
so in summary kind of the quick

618
00:29:16,410 --> 00:29:23,130
takeaways variables shouldn't be in

619
00:29:19,470 --> 00:29:25,440
general an arranged outside minus 10 to

620
00:29:23,130 --> 00:29:28,440
the 4 and 10 to the 4 also the same

621
00:29:25,440 --> 00:29:30,270
applies for the constraints the active

622
00:29:28,440 --> 00:29:32,730
range of the constraints meaning where

623
00:29:30,270 --> 00:29:35,370
the solutions really move and also the

624
00:29:32,730 --> 00:29:37,169
same apply for the good solutions

625
00:29:35,370 --> 00:29:40,830
it could solution shouldn't be too far

626
00:29:37,169 --> 00:29:44,370
away from that range either also you

627
00:29:40,830 --> 00:29:46,919
should not expect or try to compare

628
00:29:44,370 --> 00:29:49,500
quantities that have two different

629
00:29:46,919 --> 00:29:54,000
absolute values I mean if you try to

630
00:29:49,500 --> 00:29:56,490
compare 10 to the minus 10 week one and

631
00:29:54,000 --> 00:29:58,860
those quantities were computed true

632
00:29:56,490 --> 00:30:03,059
linear algebra you're really asking for

633
00:29:58,860 --> 00:30:05,669
trouble avoid those things and actually

634
00:30:03,059 --> 00:30:07,770
if you change these in your current

635
00:30:05,669 --> 00:30:09,900
models and you might get surprised

636
00:30:07,770 --> 00:30:12,090
because it may give you a boost in

637
00:30:09,900 --> 00:30:15,840
performance and and why is that well

638
00:30:12,090 --> 00:30:19,230
because grow B will try really hard to

639
00:30:15,840 --> 00:30:22,320
whenever we find numerical issues to

640
00:30:19,230 --> 00:30:25,950
solve it by ourselves either by going

641
00:30:22,320 --> 00:30:29,370
even to extra precision or by changing

642
00:30:25,950 --> 00:30:31,620
the algorithm internally all bar turning

643
00:30:29,370 --> 00:30:33,900
off some parts of the code that in

644
00:30:31,620 --> 00:30:37,919
general help to solve it quicker and so

645
00:30:33,900 --> 00:30:40,440
on and so forth so really selecting the

646
00:30:37,919 --> 00:30:42,929
right ranges for everything may be

647
00:30:40,440 --> 00:30:45,059
really key to even improve the

648
00:30:42,929 --> 00:30:46,490
performance of your core amount so give

649
00:30:45,059 --> 00:30:51,389
me the try

650
00:30:46,490 --> 00:30:54,029
so how do you check if your given model

651
00:30:51,389 --> 00:30:57,210
has some wreckage which is an important

652
00:30:54,029 --> 00:31:00,240
question how we go about that so

653
00:30:57,210 --> 00:31:03,059
probably the first thing to do is try to

654
00:31:00,240 --> 00:31:05,490
separate whatever you're doing angel

655
00:31:03,059 --> 00:31:07,830
code from whatever solver is doing and

656
00:31:05,490 --> 00:31:11,460
an easy way to do that is to use this

657
00:31:07,830 --> 00:31:13,440
parameter guru up our dump equal one if

658
00:31:11,460 --> 00:31:16,110
you do that just before calling optimize

659
00:31:13,440 --> 00:31:19,860
then optimize will generate two files

660
00:31:16,110 --> 00:31:23,009
one is called guru B dot R EU and the

661
00:31:19,860 --> 00:31:25,649
other is guru B dot PRM the first one is

662
00:31:23,009 --> 00:31:28,559
an anonymized version of your model and

663
00:31:25,649 --> 00:31:31,830
the second one is the set of all the

664
00:31:28,559 --> 00:31:33,629
options non default values that you're

665
00:31:31,830 --> 00:31:35,210
using just when you enter the

666
00:31:33,629 --> 00:31:38,490
optimization column this is key because

667
00:31:35,210 --> 00:31:42,210
essentially those parameters will manage

668
00:31:38,490 --> 00:31:44,879
and affect which algorithms are used and

669
00:31:42,210 --> 00:31:46,470
how they're used so to really be able to

670
00:31:44,879 --> 00:31:49,440
reproduce whatever you're seeing you

671
00:31:46,470 --> 00:31:52,590
need these two files so after getting

672
00:31:49,440 --> 00:31:56,159
those what you can do it let's say try

673
00:31:52,590 --> 00:31:58,799
to read the model back in Python and

674
00:31:56,159 --> 00:32:00,720
inspect so you can do that easily by

675
00:31:58,799 --> 00:32:03,840
printing the stats and that will give

676
00:32:00,720 --> 00:32:06,149
you the matrix range the objective

677
00:32:03,840 --> 00:32:09,120
coefficient range and everything and

678
00:32:06,149 --> 00:32:11,190
that will let you see if the ranges of

679
00:32:09,120 --> 00:32:16,279
these coefficients are within reason or

680
00:32:11,190 --> 00:32:19,350
not also if everything looks fine there

681
00:32:16,279 --> 00:32:21,899
you should read them into the model the

682
00:32:19,350 --> 00:32:23,549
parameters that you were using and after

683
00:32:21,899 --> 00:32:26,220
reading those parameters you can call

684
00:32:23,549 --> 00:32:31,230
optimize and you definitely want to look

685
00:32:26,220 --> 00:32:33,110
at the outer and the grubby outputs are

686
00:32:31,230 --> 00:32:36,450
designed to provide as much information

687
00:32:33,110 --> 00:32:38,340
as possible we will output in different

688
00:32:36,450 --> 00:32:40,470
situations many warning messages the

689
00:32:38,340 --> 00:32:43,500
most common one is these warning that

690
00:32:40,470 --> 00:32:46,740
the matrix provisions looks bad or the

691
00:32:43,500 --> 00:32:49,980
objective coefficients or whatever also

692
00:32:46,740 --> 00:32:52,830
you see this warning mark with Torrance

693
00:32:49,980 --> 00:32:55,320
tied into some given value that's really

694
00:32:52,830 --> 00:32:59,000
signalling that simply is struggling to

695
00:32:55,320 --> 00:33:00,120
find stable solutions and it's usually

696
00:32:59,000 --> 00:33:02,310
indication

697
00:33:00,120 --> 00:33:04,800
model indeed is having to medical issues

698
00:33:02,310 --> 00:33:07,560
for sure if you see one and switching to

699
00:33:04,800 --> 00:33:09,900
quad precision it means that Grobe not

700
00:33:07,560 --> 00:33:13,260
only couldn't manage by changing the

701
00:33:09,900 --> 00:33:15,150
algorithm but had to try on working on

702
00:33:13,260 --> 00:33:16,580
extended floating-point precision it

703
00:33:15,150 --> 00:33:19,380
talked a little bit about that later on

704
00:33:16,580 --> 00:33:21,330
and of course you see numerical error or

705
00:33:19,380 --> 00:33:24,450
numerical trouble encounter if you see

706
00:33:21,330 --> 00:33:27,270
restart crossover that means that now

707
00:33:24,450 --> 00:33:29,160
the barrier cruiser is having issues

708
00:33:27,270 --> 00:33:31,230
with your model and suboptimal

709
00:33:29,160 --> 00:33:33,240
termination is the same warning

710
00:33:31,230 --> 00:33:35,040
variables drop from the basis is use

711
00:33:33,240 --> 00:33:36,890
another warning saying that this simply

712
00:33:35,040 --> 00:33:40,200
is struggling with your problem

713
00:33:36,890 --> 00:33:44,370
landscape primal-dual violation all that

714
00:33:40,200 --> 00:33:46,470
comes again from working in your

715
00:33:44,370 --> 00:33:49,260
original model it means that Grubb is

716
00:33:46,470 --> 00:33:52,500
not able to satisfy the tolerances that

717
00:33:49,260 --> 00:33:55,020
you asked for for this given problem so

718
00:33:52,500 --> 00:33:58,050
all those are signal strong signals that

719
00:33:55,020 --> 00:33:59,870
you should think about looking in detail

720
00:33:58,050 --> 00:34:02,670
to what's going on

721
00:33:59,870 --> 00:34:05,910
also you look into the quality of the

722
00:34:02,670 --> 00:34:09,060
solutions so you can always preen

723
00:34:05,910 --> 00:34:10,560
what's the worst bound being violated

724
00:34:09,060 --> 00:34:12,150
what's the worst constraint being

725
00:34:10,560 --> 00:34:14,100
violated and what's the word integrity

726
00:34:12,150 --> 00:34:17,910
condition being violated so in this

727
00:34:14,100 --> 00:34:20,430
particular example bounds are very okay

728
00:34:17,910 --> 00:34:23,160
ten to the minus eight that's pretty

729
00:34:20,430 --> 00:34:25,350
good however in this problem we are

730
00:34:23,160 --> 00:34:28,140
seeing a constraint violation of 10 to

731
00:34:25,350 --> 00:34:30,390
the minus 4 and actually almost 10 to

732
00:34:28,140 --> 00:34:32,700
the minus 3 that's really bad however

733
00:34:30,390 --> 00:34:36,720
the integral it is I looks fine so these

734
00:34:32,700 --> 00:34:39,030
will be signalling that my solution is

735
00:34:36,720 --> 00:34:41,220
not really conforming and in and that

736
00:34:39,030 --> 00:34:44,090
probably Robin is struggling to find a

737
00:34:41,220 --> 00:34:46,410
solution confirming recurrence

738
00:34:44,090 --> 00:34:49,020
you can also inspect the condition

739
00:34:46,410 --> 00:34:51,540
number and I'm talking about that in a

740
00:34:49,020 --> 00:34:54,930
little bit essentially the condition

741
00:34:51,540 --> 00:34:59,220
number is also an indication actually if

742
00:34:54,930 --> 00:35:01,230
it's really be that the solver may be

743
00:34:59,220 --> 00:35:05,850
encountering numerical issues in your

744
00:35:01,230 --> 00:35:08,790
model other symptoms so whenever you see

745
00:35:05,850 --> 00:35:11,160
that I changed some parameter and now my

746
00:35:08,790 --> 00:35:13,810
solution changes the problem goes from

747
00:35:11,160 --> 00:35:17,400
infeasible to feasible or the optimal

748
00:35:13,810 --> 00:35:20,140
the value changes all these are strong

749
00:35:17,400 --> 00:35:24,480
symptoms showing that your problem has

750
00:35:20,140 --> 00:35:28,480
numerical issues now most of these

751
00:35:24,480 --> 00:35:31,210
problems are usually just America

752
00:35:28,480 --> 00:35:33,430
meaning that they are not truly boxed in

753
00:35:31,210 --> 00:35:35,980
Krabi would have a few but it's really

754
00:35:33,430 --> 00:35:39,370
rare most of the time please believe me

755
00:35:35,980 --> 00:35:42,940
come from numerical problems reading the

756
00:35:39,370 --> 00:35:45,670
model one way to see if that's the case

757
00:35:42,940 --> 00:35:48,280
is for example trying to solve your

758
00:35:45,670 --> 00:35:50,230
model with tightening Torrance's let's

759
00:35:48,280 --> 00:35:53,080
instead of asking 10 to the minus 6 you

760
00:35:50,230 --> 00:35:56,170
may try 10 to the minus 8 it now the

761
00:35:53,080 --> 00:35:58,750
solver becomes stable for the solutions

762
00:35:56,170 --> 00:36:02,200
or with the answer that's a strong

763
00:35:58,750 --> 00:36:05,680
indication that your problem is lacking

764
00:36:02,200 --> 00:36:08,800
in good scaling and beware although

765
00:36:05,680 --> 00:36:11,680
tidal torrents may solve the problem in

766
00:36:08,800 --> 00:36:14,980
terms of stability again you will be

767
00:36:11,680 --> 00:36:16,990
paying by extra numerical computation so

768
00:36:14,980 --> 00:36:21,690
you are paying the price on running time

769
00:36:16,990 --> 00:36:24,550
don't forget that now if you already

770
00:36:21,690 --> 00:36:26,890
improve everything the scales look nice

771
00:36:24,550 --> 00:36:29,140
and you're still getting strange answers

772
00:36:26,890 --> 00:36:34,150
well I honestly paid and call us I mean

773
00:36:29,140 --> 00:36:36,010
that's what we are for so that was about

774
00:36:34,150 --> 00:36:38,500
detecting or assessing it

775
00:36:36,010 --> 00:36:41,050
do you have numerical issues so what can

776
00:36:38,500 --> 00:36:43,600
you do once you see that you have

777
00:36:41,050 --> 00:36:45,790
numerical issues and there are some

778
00:36:43,600 --> 00:36:49,120
parameters within Robbie that help

779
00:36:45,790 --> 00:36:52,270
manage issues but again this will not

780
00:36:49,120 --> 00:36:54,850
solve them it will just try to walk

781
00:36:52,270 --> 00:36:57,670
around them and that's as I said many

782
00:36:54,850 --> 00:37:00,610
times now you will be paying in running

783
00:36:57,670 --> 00:37:04,780
time so let's go with this resolved

784
00:37:00,610 --> 00:37:07,690
resolved can sometimes introduce some

785
00:37:04,780 --> 00:37:11,860
issues one way to look at it is your if

786
00:37:07,690 --> 00:37:15,130
your problem you now load the pre-salt

787
00:37:11,860 --> 00:37:18,730
version and you can print the stats of

788
00:37:15,130 --> 00:37:21,580
this Persol model if that start shows

789
00:37:18,730 --> 00:37:24,670
that now your coefficients are looking

790
00:37:21,580 --> 00:37:26,380
really strange then maybe resolve is the

791
00:37:24,670 --> 00:37:28,020
culprit which is doesn't happen that

792
00:37:26,380 --> 00:37:30,510
often but it may

793
00:37:28,020 --> 00:37:32,610
if that's the case you can try to read

794
00:37:30,510 --> 00:37:34,830
off all together with resolve equals

795
00:37:32,610 --> 00:37:36,930
zero or you can say okay

796
00:37:34,830 --> 00:37:39,000
aggregation shouldn't be used

797
00:37:36,930 --> 00:37:41,310
aggregation essentially what we'll do is

798
00:37:39,000 --> 00:37:43,860
remember that bad example of don't lie

799
00:37:41,310 --> 00:37:46,400
to yourself of hiding ten to the six

800
00:37:43,860 --> 00:37:49,320
with six constraints what aggregate will

801
00:37:46,400 --> 00:37:52,740
essentially reweave those stuff and

802
00:37:49,320 --> 00:37:54,900
we'll show implicit B coefficients back

803
00:37:52,740 --> 00:37:55,860
into the models so you disable it

804
00:37:54,900 --> 00:37:58,590
altogether

805
00:37:55,860 --> 00:38:00,960
that won't show up in the constraint but

806
00:37:58,590 --> 00:38:02,580
remember you still have those big

807
00:38:00,960 --> 00:38:06,420
numbers whenever you're solving will be

808
00:38:02,580 --> 00:38:08,490
anyway so be careful all you can also

809
00:38:06,420 --> 00:38:11,280
disable the aggregation of Finland

810
00:38:08,490 --> 00:38:13,880
essentially Grobe will try to strengthen

811
00:38:11,280 --> 00:38:17,760
constraints and sometimes while doing so

812
00:38:13,880 --> 00:38:20,520
may introduce kind of ugly coefficients

813
00:38:17,760 --> 00:38:22,680
if that's the case then you can try by

814
00:38:20,520 --> 00:38:26,280
disabling this piece and see if that

815
00:38:22,680 --> 00:38:29,040
helps performance also think about using

816
00:38:26,280 --> 00:38:31,620
the right in general barrier is the

817
00:38:29,040 --> 00:38:33,360
fastest in general not always however

818
00:38:31,620 --> 00:38:35,580
unfortunately

819
00:38:33,360 --> 00:38:38,250
barri it's also more sensible to

820
00:38:35,580 --> 00:38:41,370
numerical issues so you should try

821
00:38:38,250 --> 00:38:44,750
either primal dual simplex and bar by

822
00:38:41,370 --> 00:38:48,420
itself and see if that helps to get more

823
00:38:44,750 --> 00:38:50,130
robust solutions for your model so it's

824
00:38:48,420 --> 00:38:53,820
always worth a try

825
00:38:50,130 --> 00:38:55,800
selecting the root node method you can

826
00:38:53,820 --> 00:38:57,620
also try to make the algorithms less

827
00:38:55,800 --> 00:39:02,460
sensitive to medical issues

828
00:38:57,620 --> 00:39:05,130
the easiest way probably is to use the

829
00:39:02,460 --> 00:39:07,590
parameter called numeric focus by

830
00:39:05,130 --> 00:39:09,420
default is set to minus one which means

831
00:39:07,590 --> 00:39:12,240
we Robbie will handle it internally and

832
00:39:09,420 --> 00:39:14,880
decide what to do you can disable it

833
00:39:12,240 --> 00:39:17,040
altogether setting it to zero and you

834
00:39:14,880 --> 00:39:19,590
can increase it all the way to one two

835
00:39:17,040 --> 00:39:21,870
and three what Robbie will do depending

836
00:39:19,590 --> 00:39:23,880
on these levels is to be more

837
00:39:21,870 --> 00:39:26,130
conservative on the Markowitz torrents

838
00:39:23,880 --> 00:39:28,170
which is handling how this impacts

839
00:39:26,130 --> 00:39:30,650
people's first like there he will also

840
00:39:28,170 --> 00:39:33,720
select when to switch to quad precision

841
00:39:30,650 --> 00:39:36,120
it will also limit gamma ray passes

842
00:39:33,720 --> 00:39:37,980
which in some cases especially for an

843
00:39:36,120 --> 00:39:40,680
American challenging problems may

844
00:39:37,980 --> 00:39:41,690
introduce issues he married this the

845
00:39:40,680 --> 00:39:44,930
number of

846
00:39:41,690 --> 00:39:48,049
passes that we do on aggregation and so

847
00:39:44,930 --> 00:39:49,940
on so this is a common thing for people

848
00:39:48,049 --> 00:39:51,859
to try when they're encountering

849
00:39:49,940 --> 00:39:55,039
numerical issues to change the Murray

850
00:39:51,859 --> 00:39:58,130
focus to either one or even three you

851
00:39:55,039 --> 00:40:00,950
can also try to change the way simplex

852
00:39:58,130 --> 00:40:05,059
do its pricing by selecting different

853
00:40:00,950 --> 00:40:07,190
norm adjust values if barrier is having

854
00:40:05,059 --> 00:40:10,280
trouble you may try to use borrow

855
00:40:07,190 --> 00:40:12,260
manginas parameter if also you can try a

856
00:40:10,280 --> 00:40:15,020
different strategy for the second across

857
00:40:12,260 --> 00:40:18,950
over babys and you can also try to

858
00:40:15,020 --> 00:40:20,720
disable cuts altogether sometimes again

859
00:40:18,950 --> 00:40:23,869
for numerically challenging problems

860
00:40:20,720 --> 00:40:27,500
they may introduce more numerical issues

861
00:40:23,869 --> 00:40:30,079
into your problem again you have to

862
00:40:27,500 --> 00:40:32,780
remember all these is not really fixed

863
00:40:30,079 --> 00:40:36,710
for the numerical issues this is a work

864
00:40:32,780 --> 00:40:39,410
around them the real way to fix them is

865
00:40:36,710 --> 00:40:44,839
really going back into the model and

866
00:40:39,410 --> 00:40:46,940
trying to change how you pose it so this

867
00:40:44,839 --> 00:40:49,069
is the last piece I have for this

868
00:40:46,940 --> 00:40:52,819
presentation and it has to do with the

869
00:40:49,069 --> 00:40:55,730
condition number so up to now what I say

870
00:40:52,819 --> 00:40:58,430
these either problems come from rounding

871
00:40:55,730 --> 00:41:02,059
input I mean not giving enough detail or

872
00:40:58,430 --> 00:41:05,089
because essentially the limits of the

873
00:41:02,059 --> 00:41:07,760
computer numbers imply that not

874
00:41:05,089 --> 00:41:10,700
everything can be done in exact or

875
00:41:07,760 --> 00:41:13,190
Eataly but not all the problems really

876
00:41:10,700 --> 00:41:16,220
come from that some problems really come

877
00:41:13,190 --> 00:41:17,569
from the geometry and that has to do

878
00:41:16,220 --> 00:41:21,950
with the condition number what I was

879
00:41:17,569 --> 00:41:24,770
showing before as Kappa so the usual

880
00:41:21,950 --> 00:41:28,700
definition is while the condition number

881
00:41:24,770 --> 00:41:31,480
of an optimization problem is trying to

882
00:41:28,700 --> 00:41:34,309
capture the idea of how sensitive your

883
00:41:31,480 --> 00:41:38,180
optimization problem is or the optimal

884
00:41:34,309 --> 00:41:41,779
solution of it is to small changes in

885
00:41:38,180 --> 00:41:45,200
different parts of the input a common

886
00:41:41,779 --> 00:41:47,750
thing that is used as a reference for

887
00:41:45,200 --> 00:41:50,240
this number for linear system at least

888
00:41:47,750 --> 00:41:52,339
is known as Cavafy which is defined as

889
00:41:50,240 --> 00:41:54,560
the norm of the matrix time the norm of

890
00:41:52,339 --> 00:41:57,140
the inverse of the matrix but I

891
00:41:54,560 --> 00:41:59,840
prefer really the geometry

892
00:41:57,140 --> 00:42:03,010
interpretation which has to do with how

893
00:41:59,840 --> 00:42:05,870
rounded the feasible region is and

894
00:42:03,010 --> 00:42:09,560
provided sets this is really simple

895
00:42:05,870 --> 00:42:13,010
essentially what you can try to imagine

896
00:42:09,560 --> 00:42:15,890
is what's the ratio between the smallest

897
00:42:13,010 --> 00:42:19,400
ball containing the feasible solution

898
00:42:15,890 --> 00:42:22,580
and the largest ball contained in the

899
00:42:19,400 --> 00:42:25,700
feasible solution so let me give you two

900
00:42:22,580 --> 00:42:28,970
examples so you may think okay I can

901
00:42:25,700 --> 00:42:31,430
work in optimizing something like behind

902
00:42:28,970 --> 00:42:33,860
with many many many many linear

903
00:42:31,430 --> 00:42:36,530
inequalities at the border so in this

904
00:42:33,860 --> 00:42:38,590
situation the geometry of the condition

905
00:42:36,530 --> 00:42:42,110
number will be the ratio between that

906
00:42:38,590 --> 00:42:44,630
slightly gray circle outside and the

907
00:42:42,110 --> 00:42:47,810
darker gray circle inside and that will

908
00:42:44,630 --> 00:42:50,150
be fairly close to one and what the

909
00:42:47,810 --> 00:42:53,570
condition number says is that well if

910
00:42:50,150 --> 00:42:56,900
that ratio is small then small changes

911
00:42:53,570 --> 00:42:59,870
in the input data should produce small

912
00:42:56,900 --> 00:43:01,640
changes in the outer solution and indeed

913
00:42:59,870 --> 00:43:04,760
that's the case so I have a script here

914
00:43:01,640 --> 00:43:07,340
you'll get it later on that does exactly

915
00:43:04,760 --> 00:43:09,790
that I define a certain weight I don't

916
00:43:07,340 --> 00:43:12,200
know in this case a thousand

917
00:43:09,790 --> 00:43:15,050
inequalities to find the circle and then

918
00:43:12,200 --> 00:43:17,330
I move a little bit here and there some

919
00:43:15,050 --> 00:43:19,550
coefficients and reoptimize and see how

920
00:43:17,330 --> 00:43:24,110
much the primary smidgen changes and if

921
00:43:19,550 --> 00:43:27,770
I do that I get these so out of 500

922
00:43:24,110 --> 00:43:29,750
iterations changing small coefficients

923
00:43:27,770 --> 00:43:32,630
on the order of ten to the minus six

924
00:43:29,750 --> 00:43:35,180
only change the primary solution about

925
00:43:32,630 --> 00:43:37,790
in the same order of magnitude one point

926
00:43:35,180 --> 00:43:42,470
seven ten to the minus six so this

927
00:43:37,790 --> 00:43:47,240
really chose that small changes as the

928
00:43:42,470 --> 00:43:49,610
geometry idea was wind resolving small

929
00:43:47,240 --> 00:43:51,980
changes in the optimal solution which

930
00:43:49,610 --> 00:43:54,920
makes sense so these problems are easy

931
00:43:51,980 --> 00:43:58,610
to solve but what if I try to optimize

932
00:43:54,920 --> 00:44:00,770
over a very thin triangle like here so

933
00:43:58,610 --> 00:44:03,830
if you imagine if I stretch this

934
00:44:00,770 --> 00:44:05,390
triangle more and more the circle thing

935
00:44:03,830 --> 00:44:08,450
we delete will get smaller and smaller

936
00:44:05,390 --> 00:44:11,390
whereas a circuit that contains it

937
00:44:08,450 --> 00:44:14,780
we'll grow more and more and the ratio

938
00:44:11,390 --> 00:44:17,000
will get to be pretty bad and what I can

939
00:44:14,780 --> 00:44:19,040
do is essentially define this

940
00:44:17,000 --> 00:44:22,550
optimization problem tree constrain

941
00:44:19,040 --> 00:44:25,430
solve it and then see what happen if I

942
00:44:22,550 --> 00:44:29,599
change a little bit a little tiny bit

943
00:44:25,430 --> 00:44:32,660
the objective function if I do that

944
00:44:29,599 --> 00:44:34,400
right away I mean even changes in the

945
00:44:32,660 --> 00:44:37,460
objective functions in the order of 10

946
00:44:34,400 --> 00:44:39,859
to the minus 6 translate themselves into

947
00:44:37,460 --> 00:44:42,230
changes in the primal solution of 16

948
00:44:39,859 --> 00:44:43,609
order of magnitude and this is not

949
00:44:42,230 --> 00:44:45,530
because it's always getting the wrong

950
00:44:43,609 --> 00:44:49,550
answer actually these three numbers are

951
00:44:45,530 --> 00:44:52,040
showing how big the primal-dual and all

952
00:44:49,550 --> 00:44:54,380
the other bound violations are which is

953
00:44:52,040 --> 00:44:56,180
essentially zero so it's always getting

954
00:44:54,380 --> 00:44:59,839
the right solution for this horrible

955
00:44:56,180 --> 00:45:02,030
problem the problem is that if you

956
00:44:59,839 --> 00:45:06,290
change the tiny major objective function

957
00:45:02,030 --> 00:45:09,380
you really may get very different

958
00:45:06,290 --> 00:45:12,530
solutions from the primal side and this

959
00:45:09,380 --> 00:45:15,200
is not to do with numerical issues is

960
00:45:12,530 --> 00:45:17,020
really to do with the geometry which

961
00:45:15,200 --> 00:45:19,910
again take us back to scaling

962
00:45:17,020 --> 00:45:22,190
essentially if you have a good scaling a

963
00:45:19,910 --> 00:45:24,950
problem that looks more round or square

964
00:45:22,190 --> 00:45:27,770
if you wish then everything should

965
00:45:24,950 --> 00:45:31,160
behave much better whereas if you have

966
00:45:27,770 --> 00:45:34,310
very thin areas you are exposing

967
00:45:31,160 --> 00:45:39,859
yourself to have being very unstable

968
00:45:34,310 --> 00:45:43,819
solutions so remember that ok recap to

969
00:45:39,859 --> 00:45:46,040
end up essentially in stability it's not

970
00:45:43,819 --> 00:45:49,069
always coming from the numbers it also

971
00:45:46,040 --> 00:45:51,109
comes from the geometry Robbie will

972
00:45:49,069 --> 00:45:53,960
never second-guess your input will

973
00:45:51,109 --> 00:45:57,530
really trust it and the best way to

974
00:45:53,960 --> 00:45:59,720
handle these numerical issues is most of

975
00:45:57,530 --> 00:46:02,390
the time think hard and rescale

976
00:45:59,720 --> 00:46:05,349
everything and maybe even change the way

977
00:46:02,390 --> 00:46:05,349
you formulate the problem

978
00:46:05,400 --> 00:46:10,340
thank for your attention your time


