tests.py [224:255]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            if not view_mode:
                # Restore database table states from previous placement
                graph.restore_unique_db_tables(previous_placement, log_dir=last_dir)
                # Update the workload with the new access trace
                graph.update_workload(job_data_access_df, workload_print_info, log_dir=last_dir)
                # Update the previous placement
                graph.update_previous_placement(previous_placement)

            # Optimization parameters
            alpha = 1  # the degree of penalty for table switch

            print(f"Running optimization for week starting on {label}")
            print("----------------------------------------")
            print(f"Inputs: days=7, egress_gb={egress_gb}, storage_gb_week={storage_gb_week}, "
                    f"compute_cloud_min={compute_cloud_min}, compute_cloud_max={compute_cloud_max}, "
                    f"network_cap_gb={reserved_bandwidth_gb}, "
                    f"storage_on_prem_min={storage_on_prem_min}, storage_on_prem_max={storage_on_prem_max}")
            print(f"penalty degree alpha={alpha}")
            print("----------------------------------------", flush=True)

            # Solve optimization problem for this period
            if not view_mode:
                graph.solve_gurobi(
                    egress_gb, storage_gb_week, compute_cloud_min, compute_cloud_max, reserved_bandwidth_gb,
                    output_path, storage_on_prem_min, storage_on_prem_max, True,
                    alpha=alpha, time_limit=24 * 60 * 60,  # 24 hours
                    p_network_gb=p_network_gb * 5,  # TODO: Hard-coded now
                )

            # Update the previous placement for the next iteration
            previous_placement = os.path.join(output_path, "dataset_placement.csv")
            last_dir = output_path
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tests.py [382:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            if not view_mode:
                # Restore database table states from previous placement
                graph.restore_unique_db_tables(previous_placement, log_dir=last_dir)
                # Update the workload with the new access trace
                graph.update_workload(job_data_access_df, workload_print_info, log_dir=last_dir)
                # Update the previous placement
                graph.update_previous_placement(previous_placement)

            # Optimization parameters
            alpha = 1 # the degree of penalty for table switch

            print(f"Running optimization for week starting on {label}")
            print("----------------------------------------")
            print(f"Inputs: days=7, egress_gb={egress_gb}, storage_gb_week={storage_gb_week}, "
                  f"compute_cloud_min={compute_cloud_min}, compute_cloud_max={compute_cloud_max}, "
                  f"network_cap_gb={reserved_bandwidth_gb}, "
                  f"storage_on_prem_min={storage_on_prem_min}, storage_on_prem_max={storage_on_prem_max}")
            print(f"penalty degree alpha={alpha}")
            print("----------------------------------------", flush=True)

            # Solve optimization problem for this period
            if not view_mode:
                graph.solve_gurobi(
                    egress_gb, storage_gb_week, compute_cloud_min, compute_cloud_max, reserved_bandwidth_gb,
                    output_path, storage_on_prem_min, storage_on_prem_max, True,
                    alpha=alpha, time_limit=24 * 60 * 60,
                    p_network_gb=p_network_gb * 5,  # TODO: Hard-coded now
                )

            # Update the previous placement for the next iteration
            previous_placement = os.path.join(output_path, "dataset_placement.csv")
            last_dir = output_path
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



