ParametricSolution

Class Description

class paminco._base.ParametricSolution(*args)[source]

List that stores B BreakpointSolutions.

Parameters
breakpointssequence of BreakpointSolutions
Attributes
flow_ipscipy.interpolate.interpolate.interp1d, optional

Interpolator of edge flows.

pot_ipscipy.interpolate.interpolate.interp1d, optional

Interpolator of node potentials.

has_potentials

Whether node potentials have been set in breakpoint solutions.

has_costs

Whether cost have been set in breakpoint solutions.

arr_param

1D array (B, ) of float: parameters of breakpoint solutions.

arr_flow

2D array (B, m) of float: edge flows of breakpoint solutions.

arr_cost

1D array (B, ) of float: total cost of breakpoint solutions.

arr_potential

2D array (B, n) of float: node potential of breakpoint solutions.

dflow

Get slope of flow after last breakpoint.

dpi

Get slope of potential after last breakpoint.

Attributes

ParametricSolution.has_potentials

Whether node potentials have been set in breakpoint solutions.

ParametricSolution.has_costs

Whether cost have been set in breakpoint solutions.

ParametricSolution.arr_param

1D array (B, ) of float: parameters of breakpoint solutions.

ParametricSolution.arr_flow

2D array (B, m) of float: edge flows of breakpoint solutions.

ParametricSolution.arr_cost

1D array (B, ) of float: total cost of breakpoint solutions.

ParametricSolution.arr_potential

2D array (B, n) of float: node potential of breakpoint solutions.

ParametricSolution.dflow

Get slope of flow after last breakpoint.

ParametricSolution.dpi

Get slope of potential after last breakpoint.

Methods

Value, Plot and Param

ParametricSolution.flow_at(param)

Interpolate flow at param.

ParametricSolution.potential_at(param)

Interpolate potential at param.

ParametricSolution.all_params([filter_same, ...])

Get parameters of all parametric solutions.

ParametricSolution.plot_flow_on_edge(edge[, ...])

Plot flow on edge.

Save and Load

ParametricSolution.from_arrays(param, flow)

Build ParametricSolution from arrays.

ParametricSolution.to_df([prefix_flow, ...])

Get ParametricSolution as dataframe.

ParametricSolution.from_df(df[, ...])

Build ParametricSolution from pandas.DataFrame.

ParametricSolution.to_csv(file[, ...])

Save ParametricSolution to CSV.

ParametricSolution.from_csv(file[, ...])

Build ParametricSolution from CSV.

ParametricSolution.make_save_dict([prefix, ...])

Generate dict to save object with numpy.savez.

ParametricSolution.save_to_numpy(file, **kwargs)

Save object into a single file in uncompressed .npz format.

ParametricSolution.from_npz(data[, prefix])

Construct object from .npz file.