py::class_<GSPN,std::shared_ptr<GSPN>>(m,"GSPN","Generalized Stochastic Petri Net")
.def("name",&GSPN::getName,"Name of GSPN")
@ -35,14 +45,14 @@ void define_gspn(py::module& m) {
.def("set_name",&GSPNBuilder::setGspnName,"Set name of GSPN",py::arg("name"))
// todo: boost::optional<uint64_t> capacity
//.def("add_place", &GSPNBuilder::addPlace, "Add a place to the GSPN", py::arg("capacity") = boost::optional<uint64_t>(1), py::arg("initialTokens") = uint_fast64_t(0), py::arg("name") = std::string(""))
//.def("add_place", &GSPNBuilder::addPlace, "Add a place to the GSPN", py::arg("capacity") = 1, py::arg("initialTokens") = 0, py::arg("name") = "")
//.def("set_place_layout_info", &GSPNBuilder::setPlaceLayoutInfo, "Set place layout information", py::arg("placeId"), py::arg("layoutInfo"))
// todo GSPNBuilder::RateType(0) ?
.def("add_immediate_transition",&GSPNBuilder::addImmediateTransition,"Adds an immediate transition to the GSPN",py::arg("priority")=uint_fast64_t(0),py::arg("weight")=double(0),py::arg("name")=std::string(""))
.def("add_immediate_transition",&GSPNBuilder::addImmediateTransition,"Adds an immediate transition to the GSPN",py::arg("priority")=0,py::arg("weight")=0,py::arg("name")="")
// todo: boost::optional<uint64_t>
.def("add_timed_transition",py::overload_cast<uint_fast64_tconst&,doubleconst&,std::stringconst&>(&GSPNBuilder::addTimedTransition),"Adds an timed transition to the GSPN",py::arg("priority"),py::arg("rate"),py::arg("name")=std::string(""))
.def("add_timed_transition",py::overload_cast<uint_fast64_tconst&,doubleconst&,std::stringconst&>(&GSPNBuilder::addTimedTransition),"Adds an timed transition to the GSPN",py::arg("priority"),py::arg("rate"),py::arg("name")="")
.def("add_timed_transition",py::overload_cast<uint_fast64_tconst&,doubleconst&,boost::optional<uint64_t>,std::stringconst&>(&GSPNBuilder::addTimedTransition),"Adds an timed transition to the GSPN",py::arg("priority"),py::arg("rate"),py::arg("numServers"),py::arg("name")="")
// todo add descriptions
@ -56,14 +66,11 @@ void define_gspn(py::module& m) {
.def("add_normal_arc",&GSPNBuilder::addNormalArc,"Add normal arc from a named element to a named element",py::arg("from"),py::arg("to"),py::arg("multiplicity")=uint64_t(1))
.def("add_normal_arc",&GSPNBuilder::addNormalArc,"Add normal arc from a named element to a named element",py::arg("from"),py::arg("to"),py::arg("multiplicity")=1)