- class pyfemtet.opt.femopt.FEMOpt(fem=None, opt=None)[source]
Bases:
objectA class to manage finite element method (FEM) optimization using a specified optimizer and FEM interface.
- opt
The optimizer instance to be used for optimization.
- Type:
- monitor_info
Dictionary to store monitoring information such as host and port.
- Parameters:
fem (AbstractFEMInterface, optional) – An instance of a FEM interface. Defaults to None, in which case a FemtetInterface is used.
opt (AbstractOptimizer, optional) – An optimizer instance. Defaults to None, in which case OptunaOptimizer is used.
- add_categorical_parameter(name, initial_value=None, choices=None, properties=None, *, pass_to_fem=True, fix=False)[source]
- add_constraint(name, fun, lower_bound=None, upper_bound=None, args=None, kwargs=None, strict=True, using_fem=None)[source]
- add_fem(fem)[source]
- Parameters:
fem (AbstractFEMInterface) –
- Return type:
OptimizationDataPerFEM
- add_parameter(name, initial_value=None, lower_bound=None, upper_bound=None, step=None, properties=None, *, pass_to_fem=True, fix=False)[source]
- add_sub_fidelity_model(name, sub_fidelity_model, fidelity)[source]
- Parameters:
name (str) –
sub_fidelity_model (SubFidelityModel) –
- opt: AbstractOptimizer
- optimize(n_trials=None, n_parallel=1, timeout=None, wait_setup=True, confirm_before_exit=True, history_path=None, with_monitor=True, scheduler_address=None, seed=None)[source]
- set_monitor_host(host=None, port=None)[source]
Sets the host IP address and the port of the process monitor.
- Parameters:
Tip
Specifying host
0.0.0.0allows viewing monitor from all computers on the local network.If no hostname is specified, the monitor server will be hosted on
localhost.We can access process monitor by accessing
`localhost:8080`on our browser by default.