View source on GitHub
|
Performs model-based analysis or optimization.
Methods
execute
@abc.abstractmethodexecute( specs: Sequence[S] ) -> M
Runs an analysis/optimization on the model using the given specs.
| Args | |
|---|---|
specs
|
Sequence of Specs containing parameters needed for the
analysis/optimization. The specs must all be of the same type as
self.spec_type() for this processor
|
| Returns | |
|---|---|
| A proto containing the results of the analysis/optimization. |
output_type
@classmethod@abc.abstractmethodoutput_type() -> type[M]
Returns the concrete output type that this ModelProcessor produces.
spec_type
@classmethod@abc.abstractmethodspec_type() -> type[S]
Returns the concrete Spec type that this ModelProcessor operates on.
__call__
__call__(
specs: Sequence[S], output: pb.Mmm
)
Runs an analysis/optimization on the model using the given specs.
This also sets the appropriate output field in the given MmmOutput proto.
| Args | |
|---|---|
specs
|
Sequence of Specs containing parameters needed for the
analysis/optimization. The specs must all be of the same type as
self.spec_type() for this processor
|
output
|
The output proto to which the results of the analysis/optimization should be attached. |
| Raises | |
|---|---|
ValueError
|
If any spec is not of the same type as self.spec_type().
|
View source on GitHub