optim_results

class nrv.optim.optim_utils.optim_results(context=None)[source]

Container class storing optimization parameters, history, and best solution data.

Attributes

optim_results.is_dummy

Indicate whether the results object is a dummy placeholder.

optim_results.is_empty

Indicate whether the results contain a declared result type.

optim_results.to_save

Indicate whether the results object should be serialized.

Methods

optim_results.__init__([context])

Initialize an optimization-results container.

optim_results.add_filter(part_filter)

Apply a post-processing filter to every stored particle position.

optim_results.clear()

optim_results.compute_best_pos(...)

Recompute simulation results at the recorded best position.

optim_results.copy()

optim_results.findbestpart([decimals, ...])

Find which particle reached the recorded best position.

optim_results.fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

optim_results.get(key[, default])

Return the value for key if key is in the dictionary, else default.

optim_results.get_parameters()

Generic method returning all the atributes of an NRV_class instance

optim_results.is_stabilized(part, it[, ...])

Check whether one particle velocity has fallen below a stabilization threshold.

optim_results.items()

optim_results.keys()

optim_results.load(data[, blacklist])

Load optimization results and reserialize the nested optimization parameters.

optim_results.plot_cost_history(ax[, ...])

Plot the optimization cost history.

optim_results.pop(k[,d])

If the key is not found, return the default if given; otherwise, raise a KeyError.

optim_results.popitem()

Remove and return a (key, value) pair as a 2-tuple.

optim_results.remove_key([keys_to_remove, ...])

Remove a key or a list of keys from the results

optim_results.save([save, fname, blacklist])

Save the results object after synchronizing its internal state.

optim_results.set_parameters(**kawrgs)

Generic method to set any attribute of NRV_class instance

optim_results.setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

optim_results.stabilization_it([parts, nit, ...])

Estimate the last iteration at which selected particles were not yet stabilized.

optim_results.update(_NRV_results__m, **kwargs)

overload of dict update method to update both attibute and items

optim_results.values()