@@ -224,36 +224,32 @@ def test_rooney_biegler_fd_central_solve(self):
224224
225225 # Use RooneyBiegler for algorithm validation (faster)
226226 experiment = get_rooney_biegler_experiment ()
227- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
227+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
228228
229229 DoE_args = get_standard_args (experiment , fd_method , obj_used )
230- indx_param_DoE_args = get_standard_args (
231- indx_param_experiment , fd_method , obj_used
230+ ind_param_DoE_args = get_standard_args (
231+ ind_param_experiment , fd_method , obj_used
232232 )
233233
234234 doe_obj = DesignOfExperiments (** DoE_args )
235- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
235+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
236236
237237 doe_obj .run_doe ()
238- indx_param_doe_obj .run_doe ()
238+ ind_param_doe_obj .run_doe ()
239239
240240 # assert model solves
241241 self .assertEqual (doe_obj .results ["Solver Status" ], "ok" )
242- self .assertEqual (indx_param_doe_obj .results ["Solver Status" ], "ok" )
242+ self .assertEqual (ind_param_doe_obj .results ["Solver Status" ], "ok" )
243243
244244 # assert that Q, F, and L are the same.
245245 FIM , Q , L , sigma_inv = get_FIM_Q_L (doe_obj = doe_obj )
246- FIM_indx , Q_indx , L_indx , sigma_inv_indx = get_FIM_Q_L (
247- doe_obj = indx_param_doe_obj
248- )
246+ FIM_ind , Q_ind , L_ind , sigma_inv_ind = get_FIM_Q_L (doe_obj = ind_param_doe_obj )
249247
250248 # Since Trace is used, no comparison for FIM and L.T @ L
251249
252250 # Make sure FIM and Q.T @ sigma_inv @ Q are close (alternate definition of FIM)
253251 self .assertTrue (np .all (np .isclose (FIM , Q .T @ sigma_inv @ Q )))
254- self .assertTrue (
255- np .all (np .isclose (FIM_indx , Q_indx .T @ sigma_inv_indx @ Q_indx ))
256- )
252+ self .assertTrue (np .all (np .isclose (FIM_ind , Q_ind .T @ sigma_inv_ind @ Q_ind )))
257253
258254 @unittest .skipIf (not pandas_available , "pandas is not available" )
259255 def test_rooney_biegler_fd_forward_solve (self ):
@@ -299,35 +295,31 @@ def test_rooney_biegler_fd_backward_solve(self):
299295
300296 # Use RooneyBiegler for algorithm validation (faster)
301297 experiment = get_rooney_biegler_experiment ()
302- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
298+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
303299
304300 DoE_args = get_standard_args (experiment , fd_method , obj_used )
305- indx_param_DoE_args = get_standard_args (
306- indx_param_experiment , fd_method , obj_used
301+ ind_param_DoE_args = get_standard_args (
302+ ind_param_experiment , fd_method , obj_used
307303 )
308304
309305 doe_obj = DesignOfExperiments (** DoE_args )
310- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
306+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
311307
312308 doe_obj .run_doe ()
313- indx_param_doe_obj .run_doe ()
309+ ind_param_doe_obj .run_doe ()
314310
315311 self .assertEqual (doe_obj .results ["Solver Status" ], "ok" )
316- self .assertEqual (indx_param_doe_obj .results ["Solver Status" ], "ok" )
312+ self .assertEqual (ind_param_doe_obj .results ["Solver Status" ], "ok" )
317313
318314 # assert that Q, F, and L are the same.
319315 FIM , Q , L , sigma_inv = get_FIM_Q_L (doe_obj = doe_obj )
320- FIM_indx , Q_indx , L_indx , sigma_inv_indx = get_FIM_Q_L (
321- doe_obj = indx_param_doe_obj
322- )
316+ FIM_ind , Q_ind , L_ind , sigma_inv_ind = get_FIM_Q_L (doe_obj = ind_param_doe_obj )
323317
324318 # Since Trace is used, no comparison for FIM and L.T @ L
325319
326320 # Make sure FIM and Q.T @ sigma_inv @ Q are close (alternate definition of FIM)
327321 self .assertTrue (np .all (np .isclose (FIM , Q .T @ sigma_inv @ Q )))
328- self .assertTrue (
329- np .all (np .isclose (FIM_indx , Q_indx .T @ sigma_inv_indx @ Q_indx ))
330- )
322+ self .assertTrue (np .all (np .isclose (FIM_ind , Q_ind .T @ sigma_inv_ind @ Q_ind )))
331323
332324 @unittest .skipIf (not pandas_available , "pandas is not available" )
333325 def test_rooney_biegler_obj_det_solve (self ):
@@ -336,11 +328,11 @@ def test_rooney_biegler_obj_det_solve(self):
336328
337329 # Use RooneyBiegler for algorithm validation (faster)
338330 experiment = get_rooney_biegler_experiment ()
339- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
331+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
340332
341333 DoE_args = get_standard_args (experiment , fd_method , obj_used )
342- indx_param_DoE_args = get_standard_args (
343- indx_param_experiment , fd_method , obj_used
334+ ind_param_DoE_args = get_standard_args (
335+ ind_param_experiment , fd_method , obj_used
344336 )
345337
346338 DoE_args ["scale_nominal_param_value" ] = (
@@ -349,30 +341,30 @@ def test_rooney_biegler_obj_det_solve(self):
349341 DoE_args ["_Cholesky_option" ] = False
350342 DoE_args ["_only_compute_fim_lower" ] = False
351343
352- indx_param_DoE_args ["scale_nominal_param_value" ] = False
353- indx_param_DoE_args ["_Cholesky_option" ] = False
354- indx_param_DoE_args ["_only_compute_fim_lower" ] = False
344+ ind_param_DoE_args ["scale_nominal_param_value" ] = False
345+ ind_param_DoE_args ["_Cholesky_option" ] = False
346+ ind_param_DoE_args ["_only_compute_fim_lower" ] = False
355347
356348 doe_obj = DesignOfExperiments (** DoE_args )
357- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
349+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
358350
359351 # Increase numerical performance by adding a prior
360352 prior_FIM = doe_obj .compute_FIM ()
361- prior_FIM_indx = indx_param_doe_obj .compute_FIM ()
353+ prior_FIM_ind = ind_param_doe_obj .compute_FIM ()
362354 doe_obj .prior_FIM = prior_FIM
363- indx_param_doe_obj .prior_FIM = prior_FIM_indx
355+ ind_param_doe_obj .prior_FIM = prior_FIM_ind
364356
365357 doe_obj .run_doe ()
366- indx_param_doe_obj .run_doe ()
358+ ind_param_doe_obj .run_doe ()
367359
368360 self .assertEqual (doe_obj .results ["Solver Status" ], "ok" )
369- self .assertEqual (indx_param_doe_obj .results ["Solver Status" ], "ok" )
361+ self .assertEqual (ind_param_doe_obj .results ["Solver Status" ], "ok" )
370362
371363 expected_design = 9.999213890476453
372364 actual_design = doe_obj .results ["Experiment Design" ][0 ]
373- actual_design_indx = indx_param_doe_obj .results ["Experiment Design" ][0 ]
365+ actual_design_ind = ind_param_doe_obj .results ["Experiment Design" ][0 ]
374366 self .assertAlmostEqual (actual_design , expected_design , places = 3 )
375- self .assertAlmostEqual (actual_design_indx , expected_design , places = 3 )
367+ self .assertAlmostEqual (actual_design_ind , expected_design , places = 3 )
376368
377369 @unittest .skipIf (not pandas_available , "pandas is not available" )
378370 def test_rooney_biegler_obj_cholesky_solve (self ):
@@ -381,49 +373,43 @@ def test_rooney_biegler_obj_cholesky_solve(self):
381373
382374 # Use RooneyBiegler for algorithm validation (faster)
383375 experiment = get_rooney_biegler_experiment ()
384- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
376+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
385377
386378 DoE_args = get_standard_args (experiment , fd_method , obj_used )
387- indx_param_DoE_args = get_standard_args (
388- indx_param_experiment , fd_method , obj_used
379+ ind_param_DoE_args = get_standard_args (
380+ ind_param_experiment , fd_method , obj_used
389381 )
390382
391383 # Add prior FIM for better numerical conditioning
392384 # This follows the pattern in rooney_biegler_doe_example.py
393385 doe_obj_prior = DesignOfExperiments (** DoE_args )
394- indx_doe_obj_prior = DesignOfExperiments (** indx_param_DoE_args )
386+ ind_doe_obj_prior = DesignOfExperiments (** ind_param_DoE_args )
395387 prior_FIM = doe_obj_prior .compute_FIM ()
396- prior_FIM_indx = indx_doe_obj_prior .compute_FIM ()
388+ prior_FIM_ind = ind_doe_obj_prior .compute_FIM ()
397389 DoE_args ['prior_FIM' ] = prior_FIM
398- indx_param_DoE_args ['prior_FIM' ] = prior_FIM_indx
390+ ind_param_DoE_args ['prior_FIM' ] = prior_FIM_ind
399391
400392 doe_obj = DesignOfExperiments (** DoE_args )
401- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
393+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
402394
403395 doe_obj .run_doe ()
404- indx_param_doe_obj .run_doe ()
396+ ind_param_doe_obj .run_doe ()
405397
406398 self .assertEqual (doe_obj .results ["Solver Status" ], "ok" )
407- self .assertEqual (indx_param_doe_obj .results ["Solver Status" ], "ok" )
399+ self .assertEqual (ind_param_doe_obj .results ["Solver Status" ], "ok" )
408400
409401 # assert that Q, F, and L are the same.
410402 FIM , Q , L , sigma_inv = get_FIM_Q_L (doe_obj = doe_obj )
411- FIM_indx , Q_indx , L_indx , sigma_inv_indx = get_FIM_Q_L (
412- doe_obj = indx_param_doe_obj
413- )
403+ FIM_ind , Q_ind , L_ind , sigma_inv_ind = get_FIM_Q_L (doe_obj = ind_param_doe_obj )
414404
415405 # Since Cholesky is used, there is comparison for FIM and L.T @ L
416406 self .assertTrue (np .all (np .isclose (FIM , L @ L .T )))
417- self .assertTrue (np .all (np .isclose (FIM_indx , L_indx @ L_indx .T )))
407+ self .assertTrue (np .all (np .isclose (FIM_ind , L_ind @ L_ind .T )))
418408
419409 # Note: When using prior_FIM, the relationship FIM = Q.T @ sigma_inv @ Q + prior_FIM
420410 self .assertTrue (np .all (np .isclose (FIM , Q .T @ sigma_inv @ Q + prior_FIM )))
421411 self .assertTrue (
422- np .all (
423- np .isclose (
424- FIM_indx , Q_indx .T @ sigma_inv_indx @ Q_indx + prior_FIM_indx
425- )
426- )
412+ np .all (np .isclose (FIM_ind , Q_ind .T @ sigma_inv_ind @ Q_ind + prior_FIM_ind ))
427413 )
428414
429415 def DISABLE_test_reactor_obj_cholesky_solve_bad_prior (self ):
@@ -468,15 +454,15 @@ def test_compute_FIM_seq_centr(self):
468454
469455 # Use RooneyBiegler for algorithm validation (faster)
470456 experiment = get_rooney_biegler_experiment ()
471- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
457+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
472458
473459 DoE_args = get_standard_args (experiment , fd_method , obj_used )
474- indx_param_DoE_args = get_standard_args (
475- indx_param_experiment , fd_method , obj_used
460+ ind_param_DoE_args = get_standard_args (
461+ ind_param_experiment , fd_method , obj_used
476462 )
477463
478464 doe_obj = DesignOfExperiments (** DoE_args )
479- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
465+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
480466
481467 expected_FIM = np .array (
482468 [[18957.7788694 , 4238.27606876 ], [4238.27606876 , 947.52577076 ]]
@@ -488,7 +474,7 @@ def test_compute_FIM_seq_centr(self):
488474 self .assertTrue (
489475 np .all (
490476 np .isclose (
491- indx_param_doe_obj .compute_FIM (method = "sequential" ), expected_FIM
477+ ind_param_doe_obj .compute_FIM (method = "sequential" ), expected_FIM
492478 )
493479 )
494480 )
@@ -502,18 +488,18 @@ def test_compute_FIM_seq_forward(self):
502488
503489 # Use RooneyBiegler for algorithm validation (faster)
504490 experiment = get_rooney_biegler_experiment ()
505- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
491+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
506492
507493 DoE_args = get_standard_args (experiment , fd_method , obj_used )
508- indx_param_DoE_args = get_standard_args (
509- indx_param_experiment , fd_method , obj_used
494+ ind_param_DoE_args = get_standard_args (
495+ ind_param_experiment , fd_method , obj_used
510496 )
511497
512498 doe_obj = DesignOfExperiments (** DoE_args )
513- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
499+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
514500
515501 doe_obj .compute_FIM (method = "sequential" )
516- indx_param_doe_obj .compute_FIM (method = "sequential" )
502+ ind_param_doe_obj .compute_FIM (method = "sequential" )
517503
518504 # This test ensure that compute FIM runs without error using the
519505 # `kaug` option. kaug computes the FIM directly so no finite difference
@@ -527,15 +513,15 @@ def test_compute_FIM_kaug(self):
527513 obj_used = "determinant"
528514
529515 experiment = get_rooney_biegler_experiment ()
530- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
516+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
531517
532518 DoE_args = get_standard_args (experiment , fd_method , obj_used )
533- indx_param_DoE_args = get_standard_args (
534- indx_param_experiment , fd_method , obj_used
519+ ind_param_DoE_args = get_standard_args (
520+ ind_param_experiment , fd_method , obj_used
535521 )
536522
537523 doe_obj = DesignOfExperiments (** DoE_args )
538- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
524+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
539525
540526 expected_FIM = np .array (
541527 [[18957.7788694 , 4238.27606876 ], [4238.27606876 , 947.52577076 ]]
@@ -546,7 +532,7 @@ def test_compute_FIM_kaug(self):
546532 )
547533 self .assertTrue (
548534 np .all (
549- np .isclose (indx_param_doe_obj .compute_FIM (method = "kaug" ), expected_FIM )
535+ np .isclose (ind_param_doe_obj .compute_FIM (method = "kaug" ), expected_FIM )
550536 )
551537 )
552538
@@ -559,18 +545,18 @@ def test_compute_FIM_seq_backward(self):
559545
560546 # Use RooneyBiegler for algorithm validation (faster)
561547 experiment = get_rooney_biegler_experiment ()
562- indx_param_experiment = get_rooney_biegler_experiment (index_vars = True )
548+ ind_param_experiment = get_rooney_biegler_experiment (index_vars = True )
563549
564550 DoE_args = get_standard_args (experiment , fd_method , obj_used )
565- indx_param_DoE_args = get_standard_args (
566- indx_param_experiment , fd_method , obj_used
551+ ind_param_DoE_args = get_standard_args (
552+ ind_param_experiment , fd_method , obj_used
567553 )
568554
569555 doe_obj = DesignOfExperiments (** DoE_args )
570- indx_param_doe_obj = DesignOfExperiments (** indx_param_DoE_args )
556+ ind_param_doe_obj = DesignOfExperiments (** ind_param_DoE_args )
571557
572558 doe_obj .compute_FIM (method = "sequential" )
573- indx_param_doe_obj .compute_FIM (method = "sequential" )
559+ ind_param_doe_obj .compute_FIM (method = "sequential" )
574560
575561 @unittest .skipIf (not pandas_available , "pandas is not available" )
576562 def test_reactor_grid_search (self ):
0 commit comments