GspnBuilder

class GspnBuilder(self: stormpy.gspn.GspnBuilder)

Bases: pybind11_object

Builder for generalized stochastic Petri nets

Constructor

add_immediate_transition(
self: stormpy.gspn.GspnBuilder,
priority: SupportsInt | SupportsIndex = 0,
weight: SupportsFloat | SupportsIndex = 0,
name: str = '',
) → int

Add an immediate transition to the GSPN

add_inhibition_arc(
from: SupportsInt | SupportsIndex,
to: SupportsInt | SupportsIndex,
multiplicity: SupportsInt | SupportsIndex = 1,
) → None
add_inhibition_arc(
from: str,
to: str,
multiplicity: SupportsInt | SupportsIndex = 1,
) → None

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,
) → None
add_input_arc(
from: str,
to: str,
multiplicity: SupportsInt | SupportsIndex = 1,
) → None

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,
) → None

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,
) → None
add_output_arc(
from: str,
to: str,
multiplicity: SupportsInt | SupportsIndex,
) → None

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 = '',
) → int

Add a place to the GSPN

add_timed_transition(
priority: SupportsInt | SupportsIndex,
rate: SupportsFloat | SupportsIndex,
name: str = '',
) → int
add_timed_transition(
priority: SupportsInt | SupportsIndex,
rate: SupportsFloat | SupportsIndex,
num_servers: SupportsInt | SupportsIndex | None,
name: str = '',
) → int

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,
) → None

Set place layout information.

Parameters:
set_transition_layout_info(
self: stormpy.gspn.GspnBuilder,
transition_id: SupportsInt | SupportsIndex,
layout_info,
) → None

Set transition layout information.

Parameters: