Skip to content

input

Handle parsing, validation, and actioning of a PROCESS input file (*IN.DAT).

NumberType = int | float module-attribute

ValidInputTypes = NumberType | str module-attribute

DataTypes = (int, float, str) module-attribute

Valid input variable types alias

INPUT_VARIABLES = {'runtitle': InputVariable('globals', str), 'i_process_run_mode': InputVariable('numerics', int, choices=[1, -2]), 'epsvmc': InputVariable('numerics', float, range=(0.0, 1.0)), 'boundl': InputVariable('numerics', float, array=True, additional_actions=_bounds_additional_actions), 'boundu': InputVariable('numerics', float, array=True, additional_actions=_bounds_additional_actions), 'epsfcn': InputVariable('numerics', float, range=(0.0, 1.0)), 'maxcal': InputVariable('globals', int, range=(0, 10000)), 'i_figure_merit': InputVariable('numerics', int), 'n_equality_constraints': InputVariable('numerics', int, range=(0, ConstraintManager.num_constraints())), 'n_inequality_constraints': InputVariable('numerics', int, range=(0, ConstraintManager.num_constraints())), 'alphaj': InputVariable('physics', float, range=(0.0, 10.0)), 'alphan': InputVariable('physics', float, range=(0.0, 10.0)), 'alphat': InputVariable('physics', float, range=(0.0, 10.0)), 'aspect': InputVariable('physics', float, range=(1.001, 40.0)), 'beamfus0': InputVariable('physics', float, range=(0.01, 10.0)), 'beta_vol_avg_max': InputVariable('physics', float, range=(0.0, 1.0)), 'beta_vol_avg_min': InputVariable('physics', float, range=(0.0, 1.0)), 'betbm0': InputVariable('physics', float, range=(0.0, 10.0)), 'b_plasma_toroidal_on_axis': InputVariable('physics', float, range=(0.0, 30.0)), 'burnup_in': InputVariable('physics', float, range=(0.0, 1.0)), 'radius_plasma_core_norm': InputVariable('impurity_radiation', float, range=(0.0, 1.0)), 'f_p_plasma_core_rad_reduction': InputVariable('impurity_radiation', float, range=(0.0, 1.0)), 'c_beta': InputVariable('physics', float, range=(0.0, 1.0)), 'csawth': InputVariable('physics', float, range=(0.0, 10.0)), 'f_vol_plasma': InputVariable('physics', float, range=(0.001, 10.0)), 'f_r_conducting_wall': InputVariable('physics', float, range=(1.0, 3.0)), 'nd_plasma_electrons_vol_avg': InputVariable('physics', float, range=(1e+18, 1e+22)), 'beta_norm_max': InputVariable('physics', float, range=(0.0, 20.0)), 'beta_poloidal_eps_max': InputVariable('physics', float, range=(0.01, 10.0)), 'f_p_alpha_plasma_deposited': InputVariable('physics', float, range=(0.0, 1.0)), 'f_p_div_lower_separatrix': InputVariable('physics', float, range=(0.0, 1.0)), 'f_plasma_fuel_deuterium': InputVariable('physics', float, range=(0.0, 1.0)), 'ffwal': InputVariable('physics', float, range=(0.0, 10.0)), 'f_nd_plasma_pedestal_greenwald': InputVariable('physics', float, range=(0.1, 1.5)), 'f_nd_plasma_separatrix_greenwald': InputVariable('physics', float, range=(0.001, 0.9)), 'f_plasma_fuel_helium3': InputVariable('physics', float, range=(-1.0, 5.0)), 'f_nd_impurity_electrons': InputVariable('impurity_radiation', float, array=True), 'fkzohm': InputVariable('physics', float, range=(0.5, 2.0)), 'abktflnc': InputVariable('costs', float, range=(0.1, 100.0)), 'adivflnc': InputVariable('costs', float, range=(0.1, 100.0)), 'admv': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'airtemp': InputVariable('water_use', float, range=(-15.0, 40.0)), 'alfapf': InputVariable('pf_coil', float, range=(1e-12, 1.0)), 'stress_cs_steel_max': InputVariable('pf_coil', float, range=(1000000.0, 100000000000.0)), 'amortization': InputVariable('costs', float, range=(1.0, 50.0)), 'anginc': InputVariable('divertor', float, range=(0.0, 1.5707)), 'rminor_min': InputVariable('build', float, range=(0.01, 10.0)), 'aux_build_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'aux_build_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'aux_build_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'auxcool_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'auxcool_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'auxcool_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'p_hcd_injected_min_mw': InputVariable('constraints', float, range=(0.01, 100.0)), 'f_t_plant_available_min': InputVariable('costs', float, range=(0.0, 1.0)), 'p_plant_electric_base': InputVariable('heat_transport', float, range=(1000000.0, 10000000000.0)), 'bcritsc': InputVariable('tfcoil', float, range=(10.0, 50.0)), 'bctmp': InputVariable('pulse', float, range=(1.0, 800.0)), 'e_beam_kev': InputVariable('current_drive', float, range=(1.0, 1000000.0)), 'dx_beam_duct': InputVariable('current_drive', float, range=(0.001, 5.0)), 'deg_div_field_plate': InputVariable('divertor', float, range=(0.0, 360.0)), 'beta_poloidal_max': InputVariable('constraints', float, range=(0.01, 2.0)), 'betai': InputVariable('divertor', float, range=(0.0, 1.5707)), 'betao': InputVariable('divertor', float, range=(0.0, 1.5707)), 'big_q_plasma_min': InputVariable('constraints', float, range=(0.01, 100.0)), 'bioshld_thk': InputVariable('buildings', float, range=(0.25, 25.0)), 'bkt_life_csf': InputVariable('cs_fatigue', float, range=(0.0, 1.0)), 'blbmith': InputVariable('build', float, range=(0.0, 2.0)), 'blbmoth': InputVariable('build', float, range=(0.0, 2.0)), 'blbpith': InputVariable('build', float, range=(0.0, 2.0)), 'blbpoth': InputVariable('build', float, range=(0.0, 2.0)), 'blbuith': InputVariable('build', float, range=(0.0, 2.0)), 'blbuoth': InputVariable('build', float, range=(0.0, 2.0)), 'bldr': InputVariable('ife', float, range=(0.0, 10.0)), 'bldrc': InputVariable('ife', float, range=(0.0, 10.0)), 'bldzl': InputVariable('ife', float, range=(0.0, 10.0)), 'bldzu': InputVariable('ife', float, range=(0.0, 10.0)), 'pres_blkt_coolant': InputVariable('fwbs', float, range=(100000.0, 100000000.0)), 'blpressure_liq': InputVariable('fwbs', float, range=(100000.0, 100000000.0)), 'b_cs_limit_max': InputVariable('pf_coil', float, range=(0.01, 100.0)), 'bmn': InputVariable('stellarator', float, range=(0.0001, 0.01)), 'b_tf_inboard_max': InputVariable('constraints', float, range=(0.1, 50.0)), 'f_c_plasma_bootstrap_max': InputVariable('current_drive', float, range=(0.0, 0.999)), 'f_c_plasma_bootstrap': InputVariable('current_drive', float, range=(0.0, 1.0)), 'breeder_f': InputVariable('fwbs', float, range=(0.0, 1.0)), 'breeder_multiplier': InputVariable('fwbs', float, range=(0.0, 1.0)), 'bz_channel_conduct_liq': InputVariable('fwbs', float, range=(1e-06, 1000000.0)), 'dr_tf_plasma_case': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'f_dr_tf_plasma_case': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'dx_tf_side_case_min': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'casths_fraction': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'cboot': InputVariable('current_drive', float, range=(0.0, 10.0)), 'cconfix': InputVariable('costs', float, range=(50.0, 200.0)), 'cconshpf': InputVariable('costs', float, range=(50.0, 200.0)), 'cconshtf': InputVariable('costs', float, range=(50.0, 200.0)), 'cdriv0': InputVariable('ife', float, range=(50.0, 500.0)), 'cdriv1': InputVariable('ife', float, range=(50.0, 500.0)), 'cdriv2': InputVariable('ife', float, range=(50.0, 500.0)), 'f_t_plant_available': InputVariable('costs', float, range=(0.0, 1.0)), 'chdzl': InputVariable('ife', float, range=(0.0, 10.0)), 'chdzu': InputVariable('ife', float, range=(0.0, 10.0)), 'chemlab_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'chemlab_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'chemlab_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'chrad': InputVariable('ife', float, range=(0.1, 20.0)), 'cland': InputVariable('costs', float, range=(10.0, 100.0)), 'clh2': InputVariable('buildings', float, range=(0.0, 30.0)), 'j_cs_flat_top_end': InputVariable('pf_coil', float, range=(10000.0, 500000000.0)), 'conf_mag': InputVariable('costs', float, range=(0.9, 1.0)), 'control_buildings_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'control_buildings_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'control_buildings_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'conv': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'coolp': InputVariable('fwbs', float, range=(100000.0, 100000000.0)), 'copper_rrr': InputVariable('rebco', float, range=(1.0, 10000.0)), 'dx_tf_hts_tape_copper': InputVariable('superconducting_tfcoil', float, range=(0.0, 0.001)), 'copperaoh_m2': InputVariable('rebco', float, range=(1.0, 10000000000.0)), 'copperaoh_m2_max': InputVariable('rebco', float, range=(10000.0, 10000000000.0)), 'cost_factor_bop': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_buildings': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_fwbs': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_land': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_misc': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_rh': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_tf_coils': InputVariable('costs', float, range=(0.1, 10.0)), 'cost_factor_vv': InputVariable('costs', float, range=(0.1, 10.0)), 'costexp': InputVariable('costs', float, range=(0.01, 5.0)), 'costexp_pebbles': InputVariable('costs', float, range=(0.01, 5.0)), 'cowner': InputVariable('costs', float, range=(0.0, 1.0)), 'cplife_input': InputVariable('costs', float, range=(0.001, 50.0)), 'cpstflnc': InputVariable('costs', float, range=(0.01, 30.0)), 'c_tf_turn': InputVariable('tfcoil', float, range=(0.001, 1000000.0)), 'c_tf_turn_max': InputVariable('tfcoil', float, range=(1.0, 1000000.0)), 'crane_arm_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'crane_clrnc_h': InputVariable('buildings', float, range=(0.0, 10.0)), 'crane_clrnc_v': InputVariable('buildings', float, range=(0.0, 10.0)), 'dx_tf_croco_strand_copper': InputVariable('superconducting_tfcoil', float, range=(0.001, 0.1)), 'cryomag_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'cryomag_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'cryomag_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'cryostat_clrnc': InputVariable('buildings', float, range=(0.0, 10.0)), 'cryostore_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'cryostore_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'cryostore_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'p_cryo_plant_electric_max_mw': InputVariable('heat_transport', float, range=(0.01, 200.0)), 'csi': InputVariable('costs', float, range=(1.0, 100.0)), 'cturbb': InputVariable('costs', float, range=(100.0, 1000.0)), 'dz_vv_lower': InputVariable('build', float, range=(0.0, 10.0)), 'dz_vv_upper': InputVariable('build', float, range=(0.0, 10.0)), 'den_tf_coil_case': InputVariable('tfcoil', float, range=(1000.0, 100000.0)), 'dcdrv0': InputVariable('ife', float, range=(0.0, 200.0)), 'dcdrv1': InputVariable('ife', float, range=(0.0, 200.0)), 'dcdrv2': InputVariable('ife', float, range=(0.0, 200.0)), 'den_tf_wp_turn_insulation': InputVariable('tfcoil', float, range=(500.0, 10000.0)), 'declblkt': InputVariable('fwbs', float, range=(0.01, 0.2)), 'declfw': InputVariable('fwbs', float, range=(0.01, 0.2)), 'declshld': InputVariable('fwbs', float, range=(0.01, 0.2)), 'decomf': InputVariable('costs', float, range=(0.0, 1.0)), 'den_steel': InputVariable('fwbs', float, range=(5000.0, 10000.0)), 'dia_tf_turn_coolant_channel': InputVariable('tfcoil', float, range=(0.0, 0.1)), 'dia_tf_turn_superconducting_cable': InputVariable('superconducting_tfcoil', float, range=(0.0001, 0.01)), 'dintrt': InputVariable('costs', float, range=(0.0, 0.1)), 'discount_rate': InputVariable('costs', float, range=(0.0, 0.5)), 'div_nref': InputVariable('costs', float, range=(1000.0, 100000000.0)), 'f_vol_div_coolant': InputVariable('divertor', float, range=(0.0, 1.0)), 'den_div_structure': InputVariable('divertor', float, range=(0.1, 100000.0)), 'dz_divertor': InputVariable('divertor', float, range=(0.1, 5.0)), 'dx_div_plate': InputVariable('divertor', float, range=(0.01, 1.0)), 'dp_blkt': InputVariable('primary_pumping', float, range=(0.0, 10000000.0)), 'dp_fw': InputVariable('primary_pumping', float, range=(0.0, 10000000.0)), 'dp_fw_blkt': InputVariable('primary_pumping', float, range=(0.0, 10000000.0)), 'dp_he': InputVariable('primary_pumping', float, range=(0.0, 10000000.0)), 'dp_liq': InputVariable('primary_pumping', float, range=(0.0, 10000000.0)), 'f_p_fw_blkt_pump': InputVariable('primary_pumping', float, range=(0.0, 10.0)), 'dr_blkt_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_blkt_outboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_bore': InputVariable('build', float, range=(0.0, 50.0)), 'dr_cryostat': InputVariable('build', float, range=(0.0, 10.0)), 'dr_cs': InputVariable('build', float, range=(0.0, 10.0)), 'dr_cs_tf_gap': InputVariable('build', float, range=(0.0, 10.0)), 'dr_fw_plasma_gap_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_fw_plasma_gap_outboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_fw_wall': InputVariable('fwbs', float, range=(0.0005, 0.1)), 'dr_pf_cryostat': InputVariable('fwbs', float, range=(0.1, 5.0)), 'dr_shld_blkt_gap': InputVariable('build', float, range=(0.0, 5.0)), 'dr_shld_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_shld_outboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_shld_thermal_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_shld_thermal_outboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_shld_vv_gap_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_tf_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_tf_shld_gap': InputVariable('build', float, range=(0.0, 5.0)), 'dr_tf_wp_with_insulation': InputVariable('tfcoil', float, range=(0.0, 10.0)), 'dr_vv_inboard': InputVariable('build', float, range=(0.0, 10.0)), 'dr_vv_outboard': InputVariable('build', float, range=(0.0, 10.0)), 'drtop': InputVariable('tfcoil', float, range=(-1.5, 1.5)), 'drveff': InputVariable('ife', float, range=(0.01, 1.0)), 'dtlife': InputVariable('costs', float, range=(0.0, 15.0)), 'dtstor': InputVariable('pulse', float, range=(50.0, 500.0)), 'dx_fw_module': InputVariable('fwbs', float, range=(0.0005, 0.1)), 'dz_tf_cryostat': InputVariable('buildings', float, range=(0.0, 20.0)), 'dztop': InputVariable('tfcoil', float, range=(-0.5, 0.5)), 'edrive': InputVariable('ife', float, range=(100000.0, 5000000000.0)), 'eff_tf_cryo': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'ejima_coeff': InputVariable('physics', float, range=(0.1, 1.0)), 'elecdist_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'elecdist_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'elecdist_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'elecload_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'elecload_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'elecload_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'elecstore_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'elecstore_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'elecstore_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'f_p_blkt_multiplication': InputVariable('fwbs', float, range=(1.0, 2.0)), 'esbldgm3': InputVariable('buildings', float, range=(1000.0, 1000000.0)), 'eta_ecrh_injector_wall_plug': InputVariable('current_drive', float, range=(0.0, 1.0)), 'eta_icrh_injector_wall_plug': InputVariable('current_drive', float, range=(0.0, 1.0)), 'eta_ebw_injector_wall_plug': InputVariable('current_drive', float, range=(0.0, 1.0)), 'eta_coolant_pump_electric': InputVariable('fwbs', float, range=(0.1, 1.0)), 'etaiso': InputVariable('fwbs', float, range=(0.1, 1.0)), 'eta_lowhyb_injector_wall_plug': InputVariable('current_drive', float, range=(0.0, 1.0)), 'etali': InputVariable('ife', float, range=(0.0, 1.0)), 'eta_beam_injector_wall_plug': InputVariable('current_drive', float, range=(0.0, 1.0)), 'etapsu': InputVariable('pf_coil', float, range=(0.0, 1.0)), 'etapump': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'etatf': InputVariable('heat_transport', float, range=(0.0, 1.0)), 'eta_turbine': InputVariable('heat_transport', float, range=(0.0, 1.0)), 'eyoung_al': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'eyoung_cond_axial': InputVariable('tfcoil', float, range=(0.0, 10000000000000.0)), 'eyoung_cond_trans': InputVariable('tfcoil', float, range=(0.0, 10000000000000.0)), 'eyoung_ins': InputVariable('tfcoil', float, range=(100000000.0, 10000000000000.0)), 'eyoung_res_tf_buck': InputVariable('tfcoil', float, range=(1e-10, 1000000000000.0)), 'eyoung_steel': InputVariable('tfcoil', float, range=(100000000.0, 10000000000000.0)), 'f_a_tf_cool_outboard': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'f_t_alpha_energy_confinement_min': InputVariable('constraints', float, range=(1.0, 100.0)), 'f_asym': InputVariable('stellarator', float, range=(0.9, 2.0)), 'f_fw_peak': InputVariable('fwbs', float, range=(1.0, 100.0)), 'f_fw_rad_max': InputVariable('constraints', float, range=(0.1, 10)), 'f_nd_alpha_thermal_electron': InputVariable('physics', float, range=(1e-12, 1.0)), 'f_nd_beam_electron': InputVariable('physics', float, range=(0.0, 1.0)), 'f_nd_protium_electrons': InputVariable('physics', float, range=(0.0, 1.0)), 'f_neut_shield': InputVariable('fwbs', float, range=(0.0, 1.0)), 'f_nuc_pow_bz_struct': InputVariable('fwbs', float, range=(0.0, 1.0)), 'f_r_cp': InputVariable('build', float, range=(1.0, 100.0)), 'f_rad': InputVariable('stellarator', float, range=(0.0, 1.0)), 'f_sync_reflect': InputVariable('physics', float, range=(0.0, 1.0)), 'f_plasma_fuel_tritium': InputVariable('physics', float, range=(0.0, 1.0)), 'f_beam_tritium': InputVariable('current_drive', float, range=(0.0, 1.0)), 'f_vforce_inboard': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'f_w': InputVariable('stellarator', float, range=(0.1, 1.0)), 'f_st_coil_aspect': InputVariable('stellarator', float, range=(0.1, 10.0)), 'f_z_cryostat': InputVariable('build', float, range=(2.0, 10.0)), 'fauxbop': InputVariable('ife', float, range=(0.0, 1.0)), 'fblbe': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblbreed': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblhebmi': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblhebmo': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblhebpi': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblhebpo': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblli': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblli2o': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fbllipb': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblss': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fblvd': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fbreed': InputVariable('ife', float, range=(0.0, 0.999)), 'fburn': InputVariable('ife', float, range=(0.01, 1.0)), 'fc_building_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'fc_building_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'fcap0': InputVariable('costs', float, range=(1.0, 1.5)), 'fcap0cp': InputVariable('costs', float, range=(1.0, 1.5)), 'fcdfuel': InputVariable('costs', float, range=(0.0, 1.0)), 'f_j_cs_start_pulse_end_flat_top': InputVariable('pf_coil', float, range=(0.0, 1.0)), 'fcontng': InputVariable('costs', float, range=(0.0, 1.0)), 'fcoolcp': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'fcr0': InputVariable('costs', float, range=(0.0, 1.0)), 'fcspc': InputVariable('build', float, range=(0.0, 1.0)), 'fcuohsu': InputVariable('pf_coil', float, range=(0.0, 1.0)), 'fcupfsu': InputVariable('pf_coil', float, range=(0.0, 1.0)), 'f_a_tf_turn_cable_copper': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'f_nd_plasma_electron_limit_max': InputVariable('constraints', float, range=(0.001, 10.0)), 'f_j_tf_wp_critical_max': InputVariable('constraints', float, range=(0.001, 1.0)), 'fjohc': InputVariable('constraints', float, range=(0.001, 1.0)), 'fjohc0': InputVariable('constraints', float, range=(0.001, 1.0)), 'fdiva': InputVariable('divertor', float, range=(0.1, 2.0)), 'fdivwet': InputVariable('stellarator', float, range=(0.01, 1.0)), 'feffcd': InputVariable('current_drive', float, range=(0.0, 20.0)), 'f_a_fw_outboard_hcd': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fhole': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fhts': InputVariable('tfcoil', float, range=(0.01, 1.0)), 'fkind': InputVariable('costs', float, range=(0.5, 1.0)), 'f_h_mode_margin': InputVariable('constraints', float, range=(0.001, 1000000.0)), 'f_l_mode_margin': InputVariable('constraints', float, range=(0.001, 1000000.0)), 'flirad': InputVariable('ife', float, range=(0.0, 10.0)), 'flpitch': InputVariable('stellarator', float, range=(0.0001, 0.01)), 'f_div_flux_expansion': InputVariable('divertor', float, range=(0.0, 10.0)), 'fmgdmw': InputVariable('heat_transport', float, range=(0.0, 100.0)), 'fndt': InputVariable('buildings', float, range=(0.0, 10.0)), 'f_p_beam_orbit_loss': InputVariable('current_drive', float, range=(0.0, 0.999)), 'f_p_blkt_coolant_pump_total_heat': InputVariable('heat_transport', float, range=(0.0, 0.2)), 'f_p_div_coolant_pump_total_heat': InputVariable('heat_transport', float, range=(0.0, 0.2)), 'f_p_fw_coolant_pump_total_heat': InputVariable('heat_transport', float, range=(0.0, 0.2)), 'f_p_shld_coolant_pump_total_heat': InputVariable('heat_transport', float, range=(0.0, 0.2)), 'fracture_toughness': InputVariable('cs_fatigue', float, range=(0.1, 100000000.0)), 'f_p_plasma_separatrix_rad_max': InputVariable('constraints', float, range=(0.0, 1.0)), 'f_radius_beam_tangency_rmajor': InputVariable('current_drive', float, range=(0.5, 2.0)), 'frhocp': InputVariable('tfcoil', float, range=(0.01, 5.0)), 'frholeg': InputVariable('tfcoil', float, range=(0.01, 5.0)), 'fseppc': InputVariable('build', float, range=(1000000.0, 1000000000.0)), 'fvoldw': InputVariable('fwbs', float, range=(0.0, 10.0)), 'fvolsi': InputVariable('fwbs', float, range=(0.0, 10.0)), 'fvolso': InputVariable('fwbs', float, range=(0.0, 10.0)), 'f_c_plasma_non_inductive': InputVariable('physics', float, range=(0.0, 1.0)), 'fw_armour_thickness': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fw_th_conductivity': InputVariable('fwbs', float, range=(1.0, 100.0)), 'fwbs_nref': InputVariable('costs', float, range=(1000.0, 100000000.0)), 'fwbs_nu': InputVariable('costs', float, range=(1000.0, 100000000.0)), 'fwbs_prob_fail': InputVariable('costs', float, range=(0.0, 1.0)), 'fwbs_umain_time': InputVariable('costs', float, range=(0.1, 2.0)), 'fwclfr': InputVariable('fwbs', float, range=(0.0, 1.0)), 'fwdr': InputVariable('ife', float, range=(0.0, 10.0)), 'fwdzl': InputVariable('ife', float, range=(0.0, 10.0)), 'fwdzu': InputVariable('ife', float, range=(0.0, 10.0)), 'fzactual': InputVariable('reinke', float, range=(0.0, 1.0)), 'eta_cd_norm_ecrh': InputVariable('current_drive', float, range=(0.0, 1.0)), 'gamma_he': InputVariable('primary_pumping', float, range=(1.0, 2.0)), 'eta_cd_norm_hcd_primary_max': InputVariable('constraints', float, range=(0.01, 10.0)), 'gapomin': InputVariable('build', float, range=(0.0, 10.0)), 'gas_buildings_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'gas_buildings_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'gas_buildings_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ground_clrnc': InputVariable('buildings', float, range=(0.0, 10.0)), 'n_ecrh_harmonic': InputVariable('current_drive', float, range=(1.0, 10.0)), 'dx_tf_hts_tape_hastelloy': InputVariable('superconducting_tfcoil', float, range=(1e-08, 0.001)), 'hccl': InputVariable('buildings', float, range=(0.0, 10.0)), 'hcd_building_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'hcd_building_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'hcd_building_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'hcwt': InputVariable('buildings', float, range=(0.0, 10.0)), 'heat_sink_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'heat_sink_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'heat_sink_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'hfact': InputVariable('physics', float, range=(0.01, 10.0)), 'pflux_div_heat_load_mw': InputVariable('divertor', float, range=(0.0, 10.0)), 'pflux_div_heat_load_max_mw': InputVariable('divertor', float, range=(0.1, 20.0)), 'hot_sepdist': InputVariable('buildings', float, range=(0.0, 10.0)), 'hotcell_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'p_blkt_coolant_pump_mw': InputVariable('heat_transport', float, range=(0.0, 1000.0)), 'p_div_coolant_pump_mw': InputVariable('heat_transport', float, range=(0.0, 1000.0)), 'p_fw_coolant_pump_mw': InputVariable('heat_transport', float, range=(0.0, 1000.0)), 'htpmw_ife': InputVariable('ife', float, range=(0.0, 1000.0)), 'p_shld_coolant_pump_mw': InputVariable('heat_transport', float, range=(0.0, 1000.0)), 'hw_storage_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'hw_storage_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'hw_storage_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ilw_smelter_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'ilw_smelter_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ilw_smelter_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ilw_storage_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'ilw_storage_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ilw_storage_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'ind_plasma_internal_norm': InputVariable('physics', float, range=(0.0, 10.0)), 'pres_vv_chamber_dwell_start': InputVariable('vacuum', float, range=(1e-06, 10000.0)), 'temp_blkt_coolant_in': InputVariable('fwbs', float, range=(200.0, 600.0)), 'inlet_temp_liq': InputVariable('fwbs', float, range=(508.0, 1500.0)), 'iotabar': InputVariable('stellarator', float, range=(0.1, 10.0)), 'j_tf_bus': InputVariable('tfcoil', float, range=(10000.0, 100000000.0)), 'kappa': InputVariable('physics', float, range=(0.99, 5.0)), 'kappa95': InputVariable('physics', float, range=(0.99, 5.0)), 'layer_ins': InputVariable('tfcoil', float, range=(0.0, 0.1)), 'f_dr_dz_cs_turn': InputVariable('pf_coil', float, range=(0.0, 5.0)), 'len_fw_channel': InputVariable('fwbs', float, range=(0.001, 1000.0)), 'len_tf_bus': InputVariable('tfcoil', float, range=(0.01, 1000.0)), 'lhat': InputVariable('reinke', float, range=(1.0, 15.0)), 'f_blkt_li6_enrichment': InputVariable('fwbs', float, range=(7.4, 100.0)), 'life_dpa': InputVariable('costs', float, range=(10.0, 100.0)), 'llw_storage_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'llw_storage_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'llw_storage_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'm_s_limit': InputVariable('physics', float, range=(0.0, 1.0)), 'magnet_pulse_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'magnet_pulse_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'magnet_pulse_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'magnet_trains_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'magnet_trains_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'magnet_trains_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'maint_cont_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'maint_cont_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'maint_cont_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'maintenance_fwbs': InputVariable('costs', float, range=(0.0, 1.0)), 'maintenance_gen': InputVariable('costs', float, range=(0.0, 1.0)), 'max_gyrotron_frequency': InputVariable('stellarator', float, range=(1000000000.0, 100000000000000.0)), 'max_vv_stress': InputVariable('tfcoil', float, range=(100000.0, 500000000.0)), 'maxpoloidalpower': InputVariable('pf_power', float, range=(0.0, 2000.0)), 'pflux_fw_rad_max': InputVariable('constraints', float, range=(0.1, 10.0)), 'mbvfac': InputVariable('buildings', float, range=(0.9, 3.0)), 'mcdriv': InputVariable('ife', float, range=(0.1, 10.0)), 'mvalim': InputVariable('constraints', float, range=(0.0, 1000.0)), 'n_cycle_min': InputVariable('cs_fatigue', float, range=(0.0, 100000000.0)), 'n_tf_coils': InputVariable('tfcoil', float, range=(0.0, 100.0)), 'n_tf_coil_turns': InputVariable('tfcoil', float, range=(0.0, 100.0)), 'nbi_sys_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'nbi_sys_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'dx_beam_shield': InputVariable('current_drive', float, range=(0.01, 0.5)), 'f_p_beam_shine_through_max': InputVariable('constraints', float, range=(1e-20, 0.1)), 'nd_plasma_pedestal_electron': InputVariable('physics', float, range=(0.0, 1e+21)), 'nd_plasma_separatrix_electron': InputVariable('physics', float, range=(0.0, 1e+21)), 'i_nd_plasma_pedestal_separatrix': InputVariable('physics', int, choices=[0, 1]), 'flu_tf_neutron_fast_max': InputVariable('constraints', float, range=(0.0, 1e+24)), 'j_tf_coil_full_area': InputVariable('tfcoil', float, range=(10000.0, 1000000000.0)), 'f_a_cs_turn_steel': InputVariable('pf_coil', float, range=(0.001, 0.999)), 'f_z_cs_tf_internal': InputVariable('pf_coil', float, range=(0.0, 2.0)), 'outgasfactor': InputVariable('vacuum', float, range=(1e-06, 1000.0)), 'outgasindex': InputVariable('vacuum', float, range=(1e-06, 1000.0)), 'temp_blkt_coolant_out': InputVariable('fwbs', float, range=(450.0, 900.0)), 'outlet_temp_liq': InputVariable('fwbs', float, range=(508.0, 1500.0)), 'p_he': InputVariable('primary_pumping', float, range=(0.0, 100000000.0)), 'paris_coefficient': InputVariable('cs_fatigue', float, range=(1e-20, 10.0)), 'paris_power_law': InputVariable('cs_fatigue', float, range=(1.0, 10.0)), 'pres_vv_chamber_base': InputVariable('vacuum', float, range=(1e-08, 0.001)), 'p_plasma_separatrix_min_mw': InputVariable('constraints', float, range=(0.1, 1000.0)), 'pdrive': InputVariable('ife', float, range=(1000000.0, 200000000.0)), 'pfbldgm3': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'rho_pf_coil': InputVariable('pf_coil', float, range=(0.0, 0.0001)), 'pfusife': InputVariable('ife', float, range=(0.0, 10000.0)), 'p_hcd_primary_extra_heat_mw': InputVariable('current_drive', float, range=(0.0, 1000.0)), 'p_hcd_secondary_extra_heat_mw': InputVariable('current_drive', float, range=(0.0, 1000.0)), 'pibv': InputVariable('buildings', float, range=(1000.0, 100000.0)), 'pifecr': InputVariable('ife', float, range=(0.0, 100.0)), 'p_hcd_injected_max': InputVariable('current_drive', float, range=(0.0, 1000.0)), 'p_hcd_secondary_injected_mw': InputVariable('current_drive', float, range=(0.0, 1000.0)), 'plasma_res_factor': InputVariable('physics', float, range=(0.0, 1.0)), 'plasma_square': InputVariable('physics', float, range=(-5.0, 5.0)), 'plleni': InputVariable('build', float, range=(0.1, 10.0)), 'plleno': InputVariable('build', float, range=(0.1, 10.0)), 'plsepi': InputVariable('build', float, range=(0.1, 10.0)), 'plsepo': InputVariable('build', float, range=(0.1, 10.0)), 'p_plant_electric_net_required_mw': InputVariable('constraints', float, range=(1.0, 10000.0)), 'pnuc_fw_ratio_dcll': InputVariable('fwbs', float, range=(0.0, 1.0)), 'poisson_al': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'poisson_copper': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'poisson_steel': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'p_fusion_total_max_mw': InputVariable('constraints', float, range=(1.0, 10000.0)), 'pres_div_chamber_burn': InputVariable('vacuum', float, range=(0.0, 10.0)), 'pres_fw_coolant': InputVariable('fwbs', float, range=(100000.0, 100000000.0)), 'prn1': InputVariable('divertor', float, range=(0.0, 1.0)), 'p_div_bt_q_aspect_rmajor_max_mw': InputVariable('constraints', float, range=(1.0, 50.0)), 'p_plasma_separatrix_rmajor_max_mw': InputVariable('constraints', float, range=(1.0, 60.0)), 'ptargf': InputVariable('ife', float, range=(0.1, 100.0)), 'temp_cp_max': InputVariable('tfcoil', float, range=(4.0, 573.15)), 'ptfnucmax': InputVariable('constraints', float, range=(1e-06, 1.0)), 'pulsetimings': InputVariable('times', int, choices=[0, 1]), 'f_a_vac_pump_port_plasma_surface': InputVariable('vacuum', float, range=(1e-06, 1.0)), 'f_volflow_vac_pumps_impedance': InputVariable('vacuum', float, range=(1e-06, 1.0)), 'volflow_vac_pumps_max': InputVariable('vacuum', float, range=(1e-06, 1000.0)), 'molflow_vac_pumps': InputVariable('vacuum', float, range=(0.0, 1e+30)), 'pflux_plant_floor_electric': InputVariable('heat_transport', float, range=(0.0, 1000.0)), 'q0': InputVariable('physics', float, range=(0.01, 20.0)), 'q95': InputVariable('physics', float, range=(1.0, 50.0)), 'q95_fixed': InputVariable('constraints', float, range=(1.0, 50.0)), 'qnty_sfty_fac': InputVariable('buildings', float, range=(0.0, 10.0)), 'qnuc': InputVariable('fwbs', float, range=(0.0, 1000000.0)), 'r_cp_top': InputVariable('build', float, range=(0.001, 10.0)), 'rad_fraction_sol': InputVariable('physics', float, range=(0.0, 1.0)), 'radius_fw_channel': InputVariable('fwbs', float, range=(0.001, 0.5)), 'outgrat_fw': InputVariable('vacuum', float, range=(1e-10, 1e-06)), 'rbrt': InputVariable('buildings', float, range=(0.0, 10.0)), 'rbvfac': InputVariable('buildings', float, range=(0.9, 3.0)), 'rbwt': InputVariable('buildings', float, range=(0.0, 10.0)), 'radius_cp_coolant_channel': InputVariable('tfcoil', float, range=(1e-06, 1.0)), 'reactor_clrnc': InputVariable('buildings', float, range=(0.0, 10.0)), 'reactor_fndtn_thk': InputVariable('buildings', float, range=(0.25, 25.0)), 'reactor_hall_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'reactor_hall_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'reactor_hall_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'reactor_roof_thk': InputVariable('buildings', float, range=(0.25, 25.0)), 'reactor_wall_thk': InputVariable('buildings', float, range=(0.25, 25.0)), 'dx_tf_hts_tape_rebco': InputVariable('superconducting_tfcoil', float, range=(1e-08, 0.0001)), 'redun_vacp': InputVariable('costs', float, range=(0.0, 100.0)), 'residual_sig_hoop': InputVariable('cs_fatigue', float, range=(0.0, 1000000000.0)), 'rho_tf_bus': InputVariable('tfcoil', float, range=(0.0, 1e-05)), 'rho_tf_joints': InputVariable('tfcoil', float, range=(0.0, 0.01)), 'radius_plasma_pedestal_density_norm': InputVariable('physics', float, range=(0.01, 1.0)), 'radius_plasma_pedestal_temp_norm': InputVariable('physics', float, range=(0.01, 1.0)), 'rhopfbus': InputVariable('pf_coil', float, range=(0.0, 1e-05)), 'rinboard': InputVariable('build', float, range=(0.1, 10.0)), 'ripple_b_tf_plasma_edge_max': InputVariable('tfcoil', float, range=(0.1, 100.0)), 'rmajor': InputVariable('physics', float, range=(0.1, 50.0)), 'robotics_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'robotics_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'robotics_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'roughness_fw_channel': InputVariable('fwbs', float, range=(0.0, 0.01)), 'dr_pf_tf_outboard_out_offset': InputVariable('pf_coil', float, range=(-3.0, 3.0)), 'row': InputVariable('buildings', float, range=(0.0, 10.0)), 'dr_pf_cs_middle_offset': InputVariable('pf_coil', float, range=(0.0, 3.0)), 'rpf2': InputVariable('pf_coil', float, range=(-3.0, 3.0)), 'rrin': InputVariable('ife', float, range=(0.1, 50.0)), 'rrmax': InputVariable('ife', float, range=(1.0, 50.0)), 'rrr_tf_cu': InputVariable('tfcoil', float, range=(1.0, 1000.0)), 'rxcl': InputVariable('buildings', float, range=(0.0, 10.0)), 'sec_buildings_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'sec_buildings_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'sec_buildings_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'sf_fast_fracture': InputVariable('cs_fatigue', float, range=(1.0, 10.0)), 'sf_radial_crack': InputVariable('cs_fatigue', float, range=(1.0, 10.0)), 'sf_vertical_crack': InputVariable('cs_fatigue', float, range=(1.0, 10.0)), 'shdr': InputVariable('ife', float, range=(0.0, 10.0)), 'shdzl': InputVariable('ife', float, range=(0.0, 10.0)), 'shdzu': InputVariable('ife', float, range=(0.0, 10.0)), 'shear': InputVariable('stellarator', float, range=(0.1, 10.0)), 'dz_shld_lower': InputVariable('build', float, range=(0.0, 10.0)), 'dz_shld_upper': InputVariable('build', float, range=(0.0, 10.0)), 'shmf': InputVariable('buildings', float, range=(0.0, 1.0)), 'shov': InputVariable('buildings', float, range=(1000.0, 1000000.0)), 'sig_tf_case_max': InputVariable('tfcoil', float, range=(1000000.0, 100000000000.0)), 'sig_tf_wp_max': InputVariable('tfcoil', float, range=(1000000.0, 100000000000.0)), 'sigallpc': InputVariable('build', float, range=(0.0, 1000000000.0)), 'sigpfcalw': InputVariable('pf_coil', float, range=(1.0, 1000.0)), 'sigpfcf': InputVariable('pf_coil', float, range=(0.1, 1.0)), 'sombdr': InputVariable('ife', float, range=(0.0, 10.0)), 'somtdr': InputVariable('ife', float, range=(0.0, 10.0)), 'staff_buildings_area': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'staff_buildings_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'startupratio': InputVariable('costs', float, range=(0.0, 10.0)), 'stcl': InputVariable('buildings', float, range=(0.0, 10.0)), 'str_cs_con_res': InputVariable('tfcoil', float, range=(-0.02, 0.02)), 'str_pf_con_res': InputVariable('tfcoil', float, range=(-0.02, 0.02)), 'str_tf_con_res': InputVariable('tfcoil', float, range=(-0.02, 0.02)), 'str_wp_max': InputVariable('tfcoil', float, range=(0.0, 0.3)), 't_plant_pulse_dwell': InputVariable('times', float, range=(0.0, 100000000.0)), 't_plant_pulse_burn': InputVariable('times', float, range=(0.0, 100000000.0)), 't_burn_min': InputVariable('constraints', float, range=(0.001, 1000000.0)), 'dx_tf_turn_cable_space_general': InputVariable('tfcoil', float, range=(0.0, 0.1)), 't_crack_radial': InputVariable('cs_fatigue', float, range=(1e-05, 1.0)), 't_crack_vertical': InputVariable('cs_fatigue', float, range=(1e-05, 1.0)), 't_plant_pulse_plasma_current_ramp_up': InputVariable('times', float, range=(0.0, 10000.0)), 't_plant_pulse_fusion_ramp': InputVariable('times', float, range=(0.0, 10000.0)), 't_in_bb': InputVariable('primary_pumping', float, range=(200.0, 1000.0)), 't_tf_quench_detection': InputVariable('tfcoil', float, range=(0.0, 100.0)), 't_out_bb': InputVariable('primary_pumping', float, range=(200.0, 1000.0)), 't_plant_pulse_coil_precharge': InputVariable('times', float, range=(0.0, 10000.0)), 't_plant_pulse_plasma_current_ramp_down': InputVariable('times', float, range=(0.0, 10000.0)), 'dr_cs_turn_conduit': InputVariable('cs_fatigue', float, range=(0.001, 1.0)), 'dz_cs_turn_conduit': InputVariable('cs_fatigue', float, range=(0.001, 1.0)), 'dx_tf_turn_general': InputVariable('tfcoil', float, range=(0.0, 0.1)), 't_turn_tf_max': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'dx_tf_hts_tape_total': InputVariable('superconducting_tfcoil', float, range=(0.0, 0.1)), 'dr_tf_hts_tape': InputVariable('superconducting_tfcoil', float, range=(0.0, 0.1)), 'tauee_in': InputVariable('physics', float, range=(0.0, 100.0)), 't_plasma_energy_confinement_max': InputVariable('physics', float, range=(0.1, 100.0)), 'tauratio': InputVariable('physics', float, range=(0.1, 100.0)), 'n_beam_decay_lengths_core_required': InputVariable('current_drive', float, range=(0.0, 10.0)), 'tbeta': InputVariable('physics', float, range=(0.0, 4.0)), 't_blkt_replace_yrs': InputVariable('costs', float, range=(0.01, 2.0)), 'tbrmin': InputVariable('constraints', float, range=(0.001, 2.0)), 'tcomrepl': InputVariable('costs', float, range=(0.01, 2.0)), 'temp_cp_coolant_inlet': InputVariable('tfcoil', float, range=(4.0, 373.15)), 'tcritsc': InputVariable('tfcoil', float, range=(1.0, 300.0)), 't_cycle_min': InputVariable('constraints', float, range=(0.001, 2000000.0)), 'tdiv': InputVariable('divertor', float, range=(0.1, 100.0)), 't_div_replace_yrs': InputVariable('costs', float, range=(0.01, 2.0)), 't_tf_superconductor_quench': InputVariable('tfcoil', float, range=(0.1, 100.0)), 'temp_plasma_electron_vol_avg_kev': InputVariable('physics', float, range=(1.0, 200.0)), 'te0_ecrh_achievable': InputVariable('stellarator', float, range=(1.0, 1000.0)), 'temp_cp_average': InputVariable('tfcoil', float, range=(4.0, 573.15)), 'temp_fw_coolant_in': InputVariable('fwbs', float, range=(300.0, 1500.0)), 'temp_fw_coolant_out': InputVariable('fwbs', float, range=(300.0, 1500.0)), 'temp_fw_max': InputVariable('fwbs', float, range=(500.0, 2000.0)), 'temp_plasma_pedestal_electron_kev': InputVariable('physics', float, range=(0.0, 20.0)), 'temp_plasma_separatrix_electron_kev': InputVariable('physics', float, range=(0.0, 20.0)), 'tfcbv': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'dx_tf_wp_insertion_gap': InputVariable('tfcoil', float, range=(1e-10, 0.1)), 'f_dr_tf_outboard_inboard': InputVariable('build', float, range=(0.2, 5.0)), 'temp_tf_operating': InputVariable('tfcoil', float, range=(0.01, 293.0)), 'temp_cs_superconductor_operating': InputVariable('pf_coil', float, range=(0.01, 293.0)), 'tgain': InputVariable('ife', float, range=(1.0, 500.0)), 'th_joint_contact': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'theta1_coil': InputVariable('tfcoil', float, range=(0.1, 60.0)), 'theta1_vv': InputVariable('tfcoil', float, range=(0.1, 60.0)), 'dx_tf_turn_insulation': InputVariable('tfcoil', float, range=(0.0, 0.1)), 'dr_tf_nose_case': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'dz_shld_thermal': InputVariable('build', float, range=(0.0, 10.0)), 'dx_tf_turn_steel': InputVariable('tfcoil', float, range=(0.0, 0.1)), 'temp_plasma_ion_vol_avg_kev': InputVariable('physics', float, range=(5.0, 50.0)), 'dx_tf_wp_insulation': InputVariable('tfcoil', float, range=(0.0, 0.1)), 'life_plant': InputVariable('costs', float, range=(1.0, 100.0)), 'tmain': InputVariable('costs', float, range=(0.0, 100.0)), 'temp_cs_superconductor_margin_min': InputVariable('tfcoil', float, range=(0.0, 20.0)), 'temp_tf_superconductor_margin_min': InputVariable('tfcoil', float, range=(0.0, 20.0)), 'temp_croco_quench_max': InputVariable('tfcoil', float, range=(4.0, 1000.0)), 'temp_tf_conductor_quench_max': InputVariable('tfcoil', float, range=(0.0, 1000.0)), 'temp_tf_cryo': InputVariable('tfcoil', float, range=(0.01, 293.0)), 'temp_vv_chamber_gas_burn_end': InputVariable('vacuum', float, range=(1.0, 1000.0)), 'i_t_current_ramp_up': InputVariable('times', int, choices=[0, 1]), 'transp_clrnc': InputVariable('buildings', float, range=(0.0, 10.0)), 'f_temp_plasma_ion_electron': InputVariable('physics', float, range=(0.0, 2.0)), 'trcl': InputVariable('buildings', float, range=(0.0, 10.0)), 'triang': InputVariable('physics', float, range=(-1.0, 1.0)), 'triang95': InputVariable('physics', float, range=(0.0, 1.0)), 'p_tritium_plant_electric_mw': InputVariable('heat_transport', float, range=(0.0, 100.0)), 'triv': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'turbine_hall_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'turbine_hall_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'turbine_hall_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'tw_storage_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'tw_storage_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'tw_storage_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'u_unplanned_cp': InputVariable('costs', float, range=(0.0, 1.0)), 'ucblbe': InputVariable('costs', float, range=(1.0, 1000.0)), 'ucblbreed': InputVariable('costs', float, range=(1.0, 1000.0)), 'ucblli': InputVariable('costs', float, range=(10.0, 10000.0)), 'ucblli2o': InputVariable('costs', float, range=(100.0, 10000.0)), 'ucbllipb': InputVariable('costs', float, range=(100.0, 10000.0)), 'ucblss': InputVariable('costs', float, range=(10.0, 1000.0)), 'ucblvd': InputVariable('costs', float, range=(100.0, 1000.0)), 'ucbus': InputVariable('costs', float, range=(0.01, 10.0)), 'uccarb': InputVariable('ife', float, range=(10.0, 1000.0)), 'uccase': InputVariable('costs', float, range=(1.0, 1000.0)), 'ucconc': InputVariable('ife', float, range=(0.1, 1000.0)), 'uccpcl1': InputVariable('costs', float, range=(1.0, 1000.0)), 'uccpclb': InputVariable('costs', float, range=(1.0, 1000.0)), 'uccry': InputVariable('costs', float, range=(10000.0, 1000000.0)), 'uccryo': InputVariable('costs', float, range=(1.0, 1000.0)), 'uccu': InputVariable('costs', float, range=(10.0, 100.0)), 'ucdiv': InputVariable('costs', float, range=(1000.0, 10000000.0)), 'ucech': InputVariable('costs', float, range=(1.0, 10.0)), 'ucf1': InputVariable('costs', float, range=(1000000.0, 50000000.0)), 'ucflib': InputVariable('ife', float, range=(10.0, 1000.0)), 'ucfnc': InputVariable('costs', float, range=(10.0, 100.0)), 'ucfuel': InputVariable('costs', float, range=(1.0, 10.0)), 'uche3': InputVariable('costs', float, range=(100000.0, 10000000.0)), 'uchrs': InputVariable('costs', float, range=(10000000.0, 500000000.0)), 'uciac': InputVariable('costs', float, range=(10000000.0, 1000000000.0)), 'ucich': InputVariable('costs', float, range=(1.0, 10.0)), 'uclh': InputVariable('costs', float, range=(1.0, 10.0)), 'ucme': InputVariable('costs', float, range=(10000000.0, 1000000000.0)), 'ucmisc': InputVariable('costs', float, range=(10000000.0, 50000000.0)), 'ucnbi': InputVariable('costs', float, range=(1.0, 10.0)), 'ucpens': InputVariable('costs', float, range=(1.0, 100.0)), 'ucpfb': InputVariable('costs', float, range=(1.0, 1000.0)), 'ucpfbk': InputVariable('costs', float, range=(1000.0, 100000.0)), 'ucpfbs': InputVariable('costs', float, range=(1000.0, 10000.0)), 'ucpfcb': InputVariable('costs', float, range=(1000.0, 100000.0)), 'ucpfdr1': InputVariable('costs', float, range=(1.0, 1000.0)), 'ucpfic': InputVariable('costs', float, range=(1000.0, 100000.0)), 'ucpfps': InputVariable('costs', float, range=(1000.0, 100000.0)), 'ucrb': InputVariable('costs', float, range=(100.0, 1000.0)), 'ucshld': InputVariable('costs', float, range=(1.0, 100.0)), 'uctarg': InputVariable('ife', float, range=(0.1, 1000.0)), 'uctfbr': InputVariable('costs', float, range=(1.0, 10.0)), 'uctfbus': InputVariable('costs', float, range=(1.0, 1000.0)), 'uctfps': InputVariable('costs', float, range=(1.0, 1000.0)), 'uctfsw': InputVariable('costs', float, range=(0.1, 10.0)), 'ucwindpf': InputVariable('costs', float, range=(100.0, 1000.0)), 'ucwindtf': InputVariable('costs', float, range=(100.0, 1000.0)), 'uubop': InputVariable('costs', float, range=(0.005, 0.1)), 'uucd': InputVariable('costs', float, range=(0.005, 0.1)), 'uudiv': InputVariable('costs', float, range=(0.005, 0.1)), 'uufuel': InputVariable('costs', float, range=(0.005, 0.1)), 'uufw': InputVariable('costs', float, range=(0.005, 0.1)), 'uumag': InputVariable('costs', float, range=(0.005, 0.1)), 'uuves': InputVariable('costs', float, range=(0.005, 0.1)), 'v1dr': InputVariable('ife', float, range=(0.0, 10.0)), 'v1dzl': InputVariable('ife', float, range=(0.0, 10.0)), 'v1dzu': InputVariable('ife', float, range=(0.0, 10.0)), 'v2dr': InputVariable('ife', float, range=(0.0, 10.0)), 'v2dzl': InputVariable('ife', float, range=(0.0, 10.0)), 'v2dzu': InputVariable('ife', float, range=(0.0, 10.0)), 'v3dr': InputVariable('ife', float, range=(0.0, 50.0)), 'v3dzl': InputVariable('ife', float, range=(0.0, 30.0)), 'v3dzu': InputVariable('ife', float, range=(0.0, 30.0)), 'vachtmw': InputVariable('heat_transport', float, range=(0.0, 100.0)), 'vel_cp_coolant_midplane': InputVariable('tfcoil', float, range=(0.001, 100.0)), 'v_tf_coil_dump_quench_max_kv': InputVariable('tfcoil', float, range=(0.0, 100.0)), 'f_a_blkt_cooling_channels': InputVariable('fwbs', float, range=(0.0, 1.0)), 'vfcblkt': InputVariable('fwbs', float, range=(0.0, 1.0)), 'f_a_cs_void': InputVariable('pf_coil', float, range=(0.0, 1.0)), 'vfpblkt': InputVariable('fwbs', float, range=(0.0, 1.0)), 'vfshld': InputVariable('fwbs', float, range=(0.0, 1.0)), 'f_a_tf_turn_cable_space_extra_void': InputVariable('tfcoil', float, range=(0.0, 1.0)), 'dz_shld_vv_gap': InputVariable('build', float, range=(0.0, 10.0)), 'dz_xpoint_divertor': InputVariable('build', float, range=(0.0, 10.0)), 'dz_fw_plasma_gap': InputVariable('build', float, range=(0.0, 10.0)), 'pflux_fw_neutron_max_mw': InputVariable('constraints', float, range=(0.001, 50.0)), 'walker_coefficient': InputVariable('cs_fatigue', float, range=(0.1, 10.0)), 'wallpf': InputVariable('fwbs', float, range=(1.0, 2.0)), 'warm_shop_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'warm_shop_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'warm_shop_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'water_buildings_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'water_buildings_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'water_buildings_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'watertemp': InputVariable('water_use', float, range=(0.0, 25.0)), 'wgt': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'wgt2': InputVariable('buildings', float, range=(10000.0, 1000000.0)), 'windspeed': InputVariable('water_use', float, range=(0.0, 10.0)), 'workshop_h': InputVariable('buildings', float, range=(1.0, 100.0)), 'workshop_l': InputVariable('buildings', float, range=(10.0, 1000.0)), 'workshop_w': InputVariable('buildings', float, range=(10.0, 1000.0)), 'wsvfac': InputVariable('buildings', float, range=(0.9, 3.0)), 'xi_ebw': InputVariable('current_drive', float, range=(0.0, 1.0)), 'xpertin': InputVariable('divertor', float, range=(0.0, 10.0)), 'n_charge_plasma_effective_vol_avg_max': InputVariable('constraints', float, range=(1.0, 10.0)), 'blktmodel': InputVariable('fwbs', int, choices=[0, 1]), 'blkttype': InputVariable('fwbs', int, choices=[1, 2, 3]), 'breedmat': InputVariable('fwbs', int, choices=[1, 2, 3]), 'cur_pf_group_flux_swing_cancellation_ma': InputVariable('pf_coil', float, array=True), 'cur_pf_group_equilibrium_ma': InputVariable('pf_coil', float, array=True), 'cfind': InputVariable('costs', float, array=True), 'i_blkt_coolant_type': InputVariable('fwbs', int, choices=[1, 2]), 'tf_coppera_m2_max': InputVariable('superconducting_tfcoil', float, range=(1000000.0, 10000000000.0)), 'i_cost_model': InputVariable('costs', int, choices=[0, 1, 2]), 'i_vac_pump_dwell': InputVariable('vacuum', int, choices=[0, 1, 2]), 'i_fw_blkt_vv_shape': InputVariable('fwbs', int, range=(1, 2)), 'hcdportsize': InputVariable('fwbs', int, range=(1, 2)), 'i_blkt_liquid_breeder_type': InputVariable('fwbs', int, choices=[0, 1]), 'i_beta_component': InputVariable('physics', int, range=(0, 3)), 'i_beta_fast_alpha': InputVariable('physics', int, choices=[0, 1]), 'i_blanket_type': InputVariable('fwbs', int, choices=[1, 5]), 'i_bldgs_size': InputVariable('buildings', int, choices=[0, 1]), 'i_bldgs_v': InputVariable('buildings', int, choices=[0, 1]), 'i_blkt_inboard': InputVariable('build', int, choices=[0, 1]), 'i_bootstrap_current': InputVariable('physics', int, range=(0, 13)), 'i_cp_joints': InputVariable('tfcoil', int, choices=[0, 1]), 'i_cp_lifetime': InputVariable('costs', int, range=(0, 3)), 'i_cs_precomp': InputVariable('build', int, choices=[0, 1]), 'i_density_limit': InputVariable('physics', int, range=(1, 8)), 'i_diamagnetic_current': InputVariable('physics', int, choices=[0, 1, 2]), 'i_div_heat_load': InputVariable('divertor', int, choices=[0, 1, 2]), 'i_l_h_threshold': InputVariable('physics', int, range=(1, 21)), 'i_pf_current': InputVariable('pf_coil', int, choices=[0, 1, 2]), 'i_pfirsch_schluter_current': InputVariable('physics', int, choices=[0, 1]), 'i_plasma_current': InputVariable('physics', int, range=(1, 9)), 'i_plasma_geometry': InputVariable('physics', int, range=(0, 12)), 'i_plasma_shape': InputVariable('physics', int, choices=[0, 1]), 'i_plasma_wall_gap': InputVariable('physics', int, choices=[0, 1]), 'i_pulsed_plant': InputVariable('pulse', int, choices=[0, 1]), 'i_q95_fixed': InputVariable('constraints', int, choices=[0, 1]), 'i_r_cp_top': InputVariable('build', int, choices=[0, 1, 2]), 'i_rad_loss': InputVariable('physics', int, choices=[0, 1, 2]), 'i_shield_mat': InputVariable('fwbs', int, choices=[0, 1]), 'i_single_null': InputVariable('physics', int, choices=[0, 1]), 'i_str_wp': InputVariable('tfcoil', int, choices=[0, 1]), 'i_r_pf_outside_tf_placement': InputVariable('pf_coil', int, choices=[0, 1]), 'i_tf_bucking': InputVariable('tfcoil', int, range=(0, 3)), 'i_tf_case_geom': InputVariable('tfcoil', int, choices=[0, 1]), 'i_tf_cond_eyoung_axial': InputVariable('tfcoil', int, choices=[0, 1, 2]), 'i_tf_cond_eyoung_trans': InputVariable('tfcoil', int, choices=[0, 1]), 'i_tf_sc_mat': InputVariable('tfcoil', int, range=(1, 9)), 'i_tf_shape': InputVariable('tfcoil', int, choices=[0, 1, 2]), 'i_tf_stress_model': InputVariable('tfcoil', int, choices=[0, 1, 2]), 'i_tf_sup': InputVariable('tfcoil', int, choices=[0, 1, 2]), 'i_tf_tresca': InputVariable('tfcoil', int, choices=[0, 1]), 'i_tf_turns_integer': InputVariable('tfcoil', int, choices=[0, 1]), 'i_tf_wp_geom': InputVariable('tfcoil', int, choices=[0, 1, 2]), 'i_plant_availability': InputVariable('costs', int, range=(0, 3)), 'ibkt_life': InputVariable('costs', int, choices=[0, 1, 2]), 'i_blkt_dual_coolant': InputVariable('fwbs', int, choices=[0, 1, 2]), 'i_hcd_primary': InputVariable('current_drive', int, range=(1, 13)), 'i_hcd_secondary': InputVariable('current_drive', int, range=(0, 13)), 'i_blkt_liquid_breeder_channel_type': InputVariable('fwbs', int, choices=[0, 1, 2]), 'ife': InputVariable('ife', int, choices=[0, 1]), 'ifedrv': InputVariable('ife', int, range=(-1, 3)), 'ifetyp': InputVariable('ife', int, range=(0, 4)), 'ifueltyp': InputVariable('costs', int, choices=[0, 1, 2]), 'i_plasma_ignited': InputVariable('physics', int, choices=[0, 1]), 'i_blkt_module_segmentation': InputVariable('fwbs', int, choices=[0, 1]), 'inuclear': InputVariable('fwbs', int, choices=[0, 1]), 'i_cs_use': InputVariable('build', int, choices=[0, 1]), 'i_plasma_pedestal': InputVariable('physics', int, choices=[0, 1]), 'i_pf_conductor': InputVariable('pf_coil', int, choices=[0, 1]), 'ipnet': InputVariable('costs', int, choices=[0, 1]), 'ipowerflow': InputVariable('heat_transport', int, choices=[0, 1]), 'i_shld_primary_heat': InputVariable('heat_transport', int, choices=[0, 1]), 'i_beta_norm_max': InputVariable('physics', int, range=(0, 5)), 'i_ind_plasma_internal_norm': InputVariable('physics', int, range=(0, 2)), 'i_alphaj': InputVariable('physics', int, range=(0, 1)), 'i_fw_blkt_shared_coolant': InputVariable('fwbs', int, choices=[0, 1, 2]), 'ireactor': InputVariable('costs', int, choices=[0, 1]), 'irefprop': InputVariable('fwbs', int, choices=[0, 1]), 'i_hcd_calculations': InputVariable('current_drive', int, choices=[0, 1]), 'i_pf_energy_storage_source': InputVariable('pf_power', int, range=(1, 3)), 'istell': InputVariable('stellarator', int, range=(0, 6)), 'isthtr': InputVariable('stellarator', int, range=(1, 3)), 'istore': InputVariable('pulse', int, range=(1, 3)), 'i_cs_superconductor': InputVariable('pf_coil', int, range=(1, 9)), 'i_pf_superconductor': InputVariable('pf_coil', int, range=(1, 9)), 'itart': InputVariable('physics', int, choices=[0, 1]), 'itartpf': InputVariable('physics', int, choices=[0, 1]), 'itcycl': InputVariable('pulse', int, range=(1, 3)), 'i_pflux_fw_neutron': InputVariable('physics', int, range=(1, 2)), 'lsa': InputVariable('costs', int, range=(1, 4)), 'm_res': InputVariable('stellarator', int, range=(1, 10)), 'n_tf_wp_layers': InputVariable('tfcoil', int, range=(1, 100)), 'i_tf_turn_type': InputVariable('superconducting_tfcoil', int, choices=[1, 2]), 'n_liq_recirc': InputVariable('fwbs', int, range=(1, 50)), 'n_tf_wp_pancakes': InputVariable('tfcoil', int, range=(1, 100)), 'n_rad_per_layer': InputVariable('tfcoil', int, range=(1, 500)), 'n_res': InputVariable('stellarator', int, range=(3, 6)), 'n_tf_graded_layers': InputVariable('tfcoil', int, range=(1, 20)), 'n_tf_joints': InputVariable('tfcoil', int, range=(1, 50)), 'n_tf_joints_contact': InputVariable('tfcoil', int, range=(1, 50)), 'n_blkt_inboard_modules_poloidal': InputVariable('fwbs', int, range=(1, 16)), 'n_blkt_outboard_modules_poloidal': InputVariable('fwbs', int, range=(1, 16)), 'n_blkt_inboard_modules_toroidal': InputVariable('fwbs', int, range=(8, 96)), 'n_blkt_outboard_modules_toroidal': InputVariable('fwbs', int, range=(8, 96)), 'npdiv': InputVariable('fwbs', int, range=(0, 4)), 'nphcdin': InputVariable('fwbs', int, range=(0, 4)), 'nphcdout': InputVariable('fwbs', int, range=(0, 4)), 'i_vacuum_pump_type': InputVariable('vacuum', int, choices=[0, 1]), 'num_rh_systems': InputVariable('costs', int, range=(1, 10)), 'output_costs': InputVariable('costs', int, choices=[0, 1]), 'i_p_coolant_pumping': InputVariable('fwbs', int, range=(0, 3)), 'reinke_mode': InputVariable('reinke', int, choices=[0, 1]), 'scan_dim': InputVariable('scan', int, range=(1, 2)), 'i_thermal_electric_conversion': InputVariable('fwbs', int, range=(0, 4)), 'secondary_cycle_liq': InputVariable('fwbs', int, range=(2, 4)), 'supercond_cost_model': InputVariable('costs', int, choices=[0, 1]), 'i_tf_inside_cs': InputVariable('build', int, choices=[0, 1]), 'i_ecrh_wave_mode': InputVariable('current_drive', int, choices=[0, 1]), 'i_confinement_time': InputVariable('physics', int, choices=list(range(N_CONFINEMENT_SCALINGS))), 'quench_model': InputVariable('tfcoil', str, choices=['exponential', 'linear']), 'i_fw_coolant_type': InputVariable('fwbs', int, choices=[1, 2]), 'i_vacuum_pumping': InputVariable('vacuum', str, choices=['old', 'simple']), 'c_pf_coil_turn_peak_input': InputVariable('pf_coil', float, array=True), 'i_pf_location': InputVariable('pf_coil', int, array=True), 'n_pf_coils_in_group': InputVariable('pf_coil', int, array=True), 'n_cs_current_filaments': InputVariable('pf_coil', int, array=True), 'n_pf_coil_groups': InputVariable('pf_coil', int, range=(0, N_PF_GROUPS_MAX)), 'rref': InputVariable('pf_coil', float, array=True), 'f_a_pf_coil_void': InputVariable('pf_coil', float, array=True), 'zref': InputVariable('pf_coil', float, array=True), 'uchts': InputVariable('costs', float, array=True), 'ucoam': InputVariable('costs', float, array=True), 'ucsc': InputVariable('costs', float, array=True), 'ucturb': InputVariable('costs', float, array=True), 'ucwst': InputVariable('costs', float, array=True), 'blmatf': InputVariable('ife', float, array=True), 'chmatf': InputVariable('ife', float, array=True), 'etave': InputVariable('ife', float, array=True), 'fwmatf': InputVariable('ife', float, array=True), 'gainve': InputVariable('ife', float, array=True), 'shmatf': InputVariable('ife', float, array=True), 'v1matf': InputVariable('ife', float, array=True), 'v2matf': InputVariable('ife', float, array=True), 'v3matf': InputVariable('ife', float, array=True), 'isweep': InputVariable('scan', int, choices=range(IPNSCNS + 1)), 'nsweep': InputVariable('scan', int, choices=range(1, IPNSCNV + 1)), 'isweep_2': InputVariable('scan', int, choices=range(IPNSCNS + 1)), 'nsweep_2': InputVariable('scan', int, choices=range(1, IPNSCNV + 1)), 'sweep': InputVariable('scan', float, array=True), 'sweep_2': InputVariable('scan', float, array=True), 'impvardiv': InputVariable('reinke', int, choices=range(3, N_ION_SPECIES + 1)), 'j_pf_coil_wp_peak': InputVariable('pf_coil', float, array=True), 'ixc': InputVariable(None, int, range=(1, N_ITERATION_VARIABLES_MAX), additional_actions=_ixc_additional_actions, set_variable=False, array=True), 'icc': InputVariable(None, int, choices=ConstraintManager.constraint_ids(), additional_actions=_icc_additional_actions, set_variable=False, array=True), 'force_vmcon_inequality_satisfication': InputVariable('numerics', int, choices=(0, 1)), 'force_vmcon_inequality_tolerance': InputVariable('numerics', float, range=(0.0, 10000000000.0)), 'i_len_sol_outboard_power_decay': InputVariable('physics', int, choices=range(4)), 'len_sol_outboard_power_decay': InputVariable('physics', float, range=(0.0, 1.0)), 'f_len_sol_power_decay_inboard_outboard': InputVariable('physics', float, range=(0.01, 2.0)), 'molflow_plasma_fuelling': InputVariable('physics', float, range=(1e+18, 1e+23))} module-attribute

InputVariable dataclass

A variable to be parsed from the input file.

Source code in process/core/input.py
 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
@dataclass(slots=True)
class InputVariable:
    """A variable to be parsed from the input file."""

    module: Any
    """The Fortran module that this variable should be set on."""
    type: type
    """The expected type of the variable"""
    range: tuple[NumberType, NumberType] | None = None
    """The valid range of values (int and float only) inclusive of the endpoints."""
    choices: list[ValidInputTypes] | None = None
    """The valid values of this input."""
    array: bool = False
    """Is this input assigning values to an array?"""
    additional_validation: (
        Callable[[str, ValidInputTypes, InputVariable], ValidInputTypes] | None
    ) = None
    """A function that takes the input variable: name, value, and config
    (this dataclass) as input and returns a cleaned version of the input value. May raise
    a ProcessValidationError.

    NOTE: The value passed in has already been cleaned in the default way and has
    been cast to the specified `type`.
    """
    additional_actions: (
        Callable[[str, ValidInputTypes, InputVariable, DataStructure], None] | None
    ) = None
    """A function that takes the input variable: name, value, config
    (this dataclass), and the data structure object as input and performs some additional
    action in addition to the default
    actions prescribed by the variables config. May raise a ProcessValidationError.

    NOTE: The value passed in has already been cleaned in the default
    way and has been cast to the specified `type`.

    NOTE:
    the input name is the cleaned name as in the input file NOT the `target_variable`.
    """
    target_name: str | None = None
    """Indicates the parsed variable name is different to its target on the `module`."""
    set_variable: bool = True
    """Do not attempt to set the variable on the module.
    Instead only do any `additional_actions`."""

    def __post_init__(self):
        """Check if InputVariable is valid

        Raises
        ------
        ProcessValueError
            Invalid InputVariable setup
        """
        if self.type not in DataTypes:
            error_msg = (
                f"Cannot parse variable of type {self.type}, must be one of {DataTypes}"
            )
            raise ProcessValueError(error_msg)

        if self.type not in {int, float} and self.range is not None:
            error_msg = "Can only apply a range to integer or float variables"
            raise ProcessValueError(error_msg)

        if not self.set_variable and self.additional_actions is None:
            logger.warning(
                "Not setting variable or performing an additional action. "
                "Why are you parsing this variable?",
                stacklevel=2,
            )

    def bounds(self) -> tuple[NumberType | None, NumberType | None]:
        """Returns the upper and lower bounds of the input.

        Returns
        -------
        lb:
            The lower bound or None if no bound is available.
        ub:
            The upper bound or None if no bound is available/

        Notes
        -----
        Precedence is given to the `range` if both it and `choices` are specified.
        """
        lb, ub = None, None
        if self.range is not None:
            lb, ub = self.range

        elif self.choices is not None and self.type in {int, float}:
            lb = min(self.choices)
            ub = max(self.choices)

        return lb, ub

module instance-attribute

The Fortran module that this variable should be set on.

type instance-attribute

The expected type of the variable

range = None class-attribute instance-attribute

The valid range of values (int and float only) inclusive of the endpoints.

choices = None class-attribute instance-attribute

The valid values of this input.

array = False class-attribute instance-attribute

Is this input assigning values to an array?

additional_validation = None class-attribute instance-attribute

A function that takes the input variable: name, value, and config (this dataclass) as input and returns a cleaned version of the input value. May raise a ProcessValidationError.

NOTE: The value passed in has already been cleaned in the default way and has been cast to the specified type.

additional_actions = None class-attribute instance-attribute

A function that takes the input variable: name, value, config (this dataclass), and the data structure object as input and performs some additional action in addition to the default actions prescribed by the variables config. May raise a ProcessValidationError.

NOTE: The value passed in has already been cleaned in the default way and has been cast to the specified type.

NOTE: the input name is the cleaned name as in the input file NOT the target_variable.

target_name = None class-attribute instance-attribute

Indicates the parsed variable name is different to its target on the module.

set_variable = True class-attribute instance-attribute

Do not attempt to set the variable on the module. Instead only do any additional_actions.

bounds()

Returns the upper and lower bounds of the input.

Returns:

Name Type Description
lb NumberType | None

The lower bound or None if no bound is available.

ub NumberType | None

The upper bound or None if no bound is available/

Notes

Precedence is given to the range if both it and choices are specified.

Source code in process/core/input.py
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
def bounds(self) -> tuple[NumberType | None, NumberType | None]:
    """Returns the upper and lower bounds of the input.

    Returns
    -------
    lb:
        The lower bound or None if no bound is available.
    ub:
        The upper bound or None if no bound is available/

    Notes
    -----
    Precedence is given to the `range` if both it and `choices` are specified.
    """
    lb, ub = None, None
    if self.range is not None:
        lb, ub = self.range

    elif self.choices is not None and self.type in {int, float}:
        lb = min(self.choices)
        ub = max(self.choices)

    return lb, ub

parse_input_file(data_structure_obj, in_dat)

Create a dictionary of variables from the input file and set the values on the data structure

Parameters:

Name Type Description Default
data_structure_obj DataStructure

The data structure object

required
in_dat InDat

The input file data from InDat

required

Raises:

Type Description
ProcessValidationError

If bounds are not of the correct form of boundl(index) = value

Source code in process/core/input.py
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
def parse_input_file(data_structure_obj: DataStructure, in_dat: InDat):
    """Create a dictionary of variables from the input file
    and set the values on the data structure

    Parameters
    ----------
    data_structure_obj: DataStructure
        The data structure object
    in_dat: InDat
        The input file data from InDat

    Raises
    ------
    ProcessValidationError
        If bounds are not of the correct form of boundl(index) = value

    """
    # These need to be set to zero so the iteration variables are not counted multiple
    # times (this would otherwise occur when using get_mfile_initial_ixc_values())
    data_structure_obj.numerics.n_iteration_variables = 0
    data_structure_obj.numerics.n_constraints = 0

    variables = {}

    for variable_name, info in in_dat.data.items():
        # the upper and lower bounds already exist as boundu and
        # boundl arrays, so no need to process the bounds dictionary
        if variable_name == "bounds":
            continue
        variables = set_on_datastructure(
            variable_name=variable_name,
            info=info,
            data_structure_obj=data_structure_obj,
            variables=variables,
        )

    return variables

set_on_datastructure(variable_name, info, data_structure_obj, variables)

Set the values from the IN.DAT on the data structure, and store in variables dictionary

Parameters:

Name Type Description Default
variable_name

The variable's name

required
info

Information of a single variable from the IN.DAT file

required
data_structure_obj

The data structure object

required
variables

Dictionary of variables to be updated

required
Source code in process/core/input.py
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
def set_on_datastructure(variable_name, info, data_structure_obj, variables):
    """Set the values from the IN.DAT on the data structure, and store in
    variables dictionary

    Parameters
    ----------
    variable_name: str
        The variable's name
    info: INVariable
        Information of a single variable from the IN.DAT file
    data_structure_obj: DataStructure
        The data structure object
    variables: dict
        Dictionary of variables to be updated
    """
    variable_config = copy.copy(INPUT_VARIABLES.get(variable_name))
    # string indicates it should be set on the new object data structure
    if isinstance(variable_config.module, str):
        module = data_structure_obj
        for name in variable_config.module.split("."):
            module = getattr(module, name)

        variable_config.module = module
    variable_value = info.value

    # Validate the variable and also clean it (cast to correct type)
    # If the variable value (after the = sign) contains a ',' or is a list (len > 0)
    # then it defines the whole array so needs to be split down into its elements
    # and the parsed like an array defined as 'my_array(<index>) = <value>'
    if "," in variable_value:
        variable_value = list(variable_value.split(","))
    if len(np.shape(variable_value)) > 0 or "," in variable_value:
        clean_variable_value = [
            validate_variable(
                variable_name,
                v,
                i,
                variable_config,
            )
            for i, v in enumerate(variable_value, start=1)
        ]
    else:
        clean_variable_value = validate_variable(
            variable_name,
            variable_value,
            None,
            variable_config,
        )

    # perform any additional actions before setting values on the data structure
    if variable_config.additional_actions is not None:
        # intentionally passing the variable name as in the input file,
        # not the module target name.
        variable_config.additional_actions(
            variable_name,
            clean_variable_value,
            variable_config,
            data_structure_obj,
        )

    # check if the target name in the module is different to the variable name
    # in the input file
    variable_name_in_module = variable_config.target_name or variable_name

    if variable_config.set_variable:
        if isinstance(clean_variable_value, list):
            for idx, value in enumerate(clean_variable_value, start=1):
                set_array_variable(
                    variable_name_in_module,
                    value,
                    idx,
                    variable_config,
                )
        else:
            set_scalar_variable(
                variable_name_in_module, clean_variable_value, variable_config
            )

        # add the variable to a dictionary indexed by the variable name
        # (in the input file)
        variables[variable_name] = {
            "value": clean_variable_value,
            "config": variable_config,
        }

    return variables

validate_variable(name, value, array_index, config)

Validate an input.

Parameters:

Name Type Description Default
name str

the name of the input.

required
value str

the value of the input variable.

required
array_index int | None

the array index of the variable in the input file.

required
config InputVariable

the config of the variable that describes how to validate and process it.

required

Returns:

Type Description
ValidInputTypes

the input value with the correct type.

Raises:

Type Description
ProcessValidationError

Variable validation failure

Source code in process/core/input.py
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
def validate_variable(
    name: str,
    value: str,
    array_index: int | None,
    config: InputVariable,
) -> ValidInputTypes:
    """Validate an input.

    Parameters
    ----------
    name :
        the name of the input.
    value :
        the value of the input variable.
    array_index :
        the array index of the variable in the input file.
    config :
        the config of the variable that describes how to validate and process it.

    Returns
    -------
    :
        the input value with the correct type.

    Raises
    ------
    ProcessValidationError
        Variable validation failure
    """
    # check that if the variable should be an array, then an array index is provided

    if array_index is None and config.array:
        error_msg = f"Expected '{name}' to be an array."
        raise ProcessValidationError(error_msg)

    if array_index is not None and not config.array:
        error_msg = f"Not expecting '{name}' to be an array."
        raise ProcessValidationError(error_msg)

    if config.type in {float, int} and isinstance(value, str):
        value = value.lower().replace("d", "e")

    try:
        clean_value = config.type(value)
    except ValueError as e:
        error_msg = (
            f"Cannot cast variable name '{name}' to a {config.type} (value = {value})"
        )
        raise ProcessValidationError(error_msg) from e

    if (
        config.range is not None
        and not config.range[0] <= clean_value <= config.range[1]
    ):
        error_msg = (
            f"Variable '{name}' is not on the prescribed range"
            f" {config.range} (value = {value})"
        )
        raise ProcessValidationError(error_msg)

    if config.choices is not None and clean_value not in config.choices:
        error_msg = f"Variable '{name}' is not one of {config.choices} (value = {value})"
        raise ProcessValidationError(error_msg)

    if config.additional_validation is not None:
        clean_value = config.additional_validation(name, clean_value, config)

    return clean_value

set_scalar_variable(name, value, config)

Set a scalar (not part of an array) variable in the config.module.

Parameters:

Name Type Description Default
name str

the name of the input.

required
value ValidInputTypes

the value of the input variable.

required
config InputVariable

the config of the variable that describes how to validate and process it.

required

Raises:

Type Description
ProcessValueError

variable not found

Source code in process/core/input.py
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
def set_scalar_variable(name: str, value: ValidInputTypes, config: InputVariable):
    """Set a scalar (not part of an array) variable in the `config.module`.

    Parameters
    ----------
    name :
        the name of the input.
    value :
        the value of the input variable.
    config :
        the config of the variable that describes how to validate and process it.

    Raises
    ------
    ProcessValueError
        variable not found
    """
    current_value = getattr(config.module, name, ...)

    # use ... sentinel because None is probably a valid return from Fortran
    # and definitely will be when moving to a Python data structure
    if current_value is ...:
        error_msg = (
            f"Fortran module '{config.module}' does not have a variable '{name}'."
        )
        raise ProcessValueError(error_msg)

    setattr(config.module, name, value)

set_array_variable(name, value, array_index, config)

Set an array variable in the config.module.

The way PROCESS input files are structured, each element of the array is provided on one line so this function just needs to set the value at array_index (-1) because of Fortran-based indexing.

Parameters:

Name Type Description Default
name str

the name of the input.

required
value str

the value of the input variable.

required
array_index int

the array index of the variable in the input file.

required
config InputVariable

the config of the variable that describes how to validate and process it.

required

Raises:

Type Description
ProcessValueError

variable not found

Source code in process/core/input.py
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
def set_array_variable(name: str, value: str, array_index: int, config: InputVariable):
    """Set an array variable in the `config.module`.

    The way PROCESS input files are structured, each element of the array is provided on
    one line
    so this function just needs to set the `value` at `array_index` (-1)
    because of Fortran-based indexing.

    Parameters
    ----------
    name :
        the name of the input.
    value :
        the value of the input variable.
    array_index :
        the array index of the variable in the input file.
    config :
        the config of the variable that describes how to validate and process it.

    Raises
    ------
    ProcessValueError
        variable not found
    """
    current_array = getattr(config.module, name, ...)
    shape = current_array.shape

    # use ... sentinel for same reason as above
    if current_array is ...:
        error_msg = f"Data structure '{config.module}' does not have an array '{name}'."
        raise ProcessValueError(error_msg)

    if config.type is str:
        raise NotImplementedError

    new_array = copy.deepcopy(current_array)

    if len(shape) > 1:
        new_array = new_array.T.ravel()

    new_array[array_index - 1] = value

    if len(shape) > 1:
        new_array = new_array.reshape(shape, order="F")

    setattr(config.module, name, new_array)