GspnBuilder¶
- class GspnBuilder(self: stormpy.gspn.GspnBuilder)¶
Bases:
pybind11_objectBuilder for generalized stochastic Petri nets
Constructor
- add_immediate_transition(
- self: stormpy.gspn.GspnBuilder,
- priority: SupportsInt | SupportsIndex = 0,
- weight: SupportsFloat | SupportsIndex = 0,
- name: str = '',
Add an immediate transition to the GSPN
- add_inhibition_arc(
- from: SupportsInt | SupportsIndex,
- to: SupportsInt | SupportsIndex,
- multiplicity: SupportsInt | SupportsIndex = 1,
- add_inhibition_arc(
- from: str,
- to: str,
- multiplicity: SupportsInt | SupportsIndex = 1,
Add an new inhibition arc from a place to a transition.
- param from:
The ID or name of the place from which the arc is originating.
- type from:
uint_64_t or str
- param to:
The ID or name of the transition to which the arc goes to.
- type to:
uint_64_t or str
- param uint64_t multiplicity:
The multiplicity of the arc, default = 1.
- add_input_arc(
- from: SupportsInt | SupportsIndex,
- to: SupportsInt | SupportsIndex,
- multiplicity: SupportsInt | SupportsIndex = 1,
- add_input_arc(
- from: str,
- to: str,
- multiplicity: SupportsInt | SupportsIndex = 1,
Add a new input arc from a place to a transition
- param from:
The ID or name of the place from which the arc is originating.
- type from:
uint_64_t or str
- param to:
The ID or name of the transition to which the arc goes to.
- type to:
uint_64_t or str
- param uint64_t multiplicity:
The multiplicity of the arc, default = 1.
- add_normal_arc(
- self: stormpy.gspn.GspnBuilder,
- from: str,
- to: str,
- multiplicity: SupportsInt | SupportsIndex = 1,
Add an arc from a named element to a named element. Can be both input or output arc, but not an inhibition arc. Convenience function for textual format parsers.
- Parameters:
from (str) – Source element in the GSPN from where this arc starts.
to (str) – Target element in the GSPN where this arc ends.
multiplicity (uint64_t) – Multiplicity of the arc, default = 1.
- add_output_arc(
- from: SupportsInt | SupportsIndex,
- to: SupportsInt | SupportsIndex,
- multiplicity: SupportsInt | SupportsIndex = 1,
- add_output_arc(
- from: str,
- to: str,
- multiplicity: SupportsInt | SupportsIndex,
Add an new output arc from a transition to a place.
- param from:
The ID or name of the transition from which the arc is originating.
- type from:
uint_64_t or str
- param to:
The ID or name of the place to which the arc goes to.
- type to:
uint_64_t or str
- param uint64_t multiplicity:
The multiplicity of the arc, default = 1.
- add_place(
- self: stormpy.gspn.GspnBuilder,
- capacity: SupportsInt | SupportsIndex | None = 1,
- initial_tokens: SupportsInt | SupportsIndex = 0,
- name: str = '',
Add a place to the GSPN
- add_timed_transition(
- priority: SupportsInt | SupportsIndex,
- rate: SupportsFloat | SupportsIndex,
- name: str = '',
- add_timed_transition(
- priority: SupportsInt | SupportsIndex,
- rate: SupportsFloat | SupportsIndex,
- num_servers: SupportsInt | SupportsIndex | None,
- name: str = '',
Add a timed transition to the GSPN
- build_gspn(
- self: stormpy.gspn.GspnBuilder,
- expression_manager: stormpy.expressions.ExpressionManager = None,
- constants_substitution: collections.abc.Mapping[stormpy.expressions.Variable, stormpy.expressions.Expression] = {},
Construct GSPN
- set_gspn_name(self: stormpy.gspn.GspnBuilder, name: str) None¶
Set name of GSPN
- set_place_layout_info(
- self: stormpy.gspn.GspnBuilder,
- place_id: SupportsInt | SupportsIndex,
- layout_info,
Set place layout information.
- Parameters:
id (uint64_t) – The ID of the place.
layout_info (stormpy.gspn.LayoutInfo) – The layout information.
- set_transition_layout_info(
- self: stormpy.gspn.GspnBuilder,
- transition_id: SupportsInt | SupportsIndex,
- layout_info,
Set transition layout information.
- Parameters:
id (uint64_t) – The ID of the transition.
layout_info (stormpy.gspn.LayoutInfo) – The layout information.