#include <stdio.h>
#include "tinyxml.h"
#include <iostream>
#include <cstring>
#include<string>
#include<vector>
#include <stdlib.h>
using namespace std;
//边表
typedef struct EdgeNode
{
string id;
string source;
string target;
int sourceNum;
int sourceP;//源节点是库所,则sourceP为1
int sourceT;
int targetNum;//对应nextToVertex
struct EdgeNode *nextEdge;
}EdgeNode, *PEdgeNode;
struct Arc {
string id;
string source;
string target;
int sourceNum = 0;
int sourceP = 0;//源节点是库所,则sourceP为1
int sourceT = 0;
int targetNum = 0;
};
//库所顶点表
typedef struct
{
string name;
int num = 0;
int initialMarking = 0;
PEdgeNode firstEdge = NULL;
}PlaceVertexNode, *PVertexNode;
//变迁顶点表
typedef struct
{
string name;
int num = 0;
PEdgeNode firstEdge = NULL;
}TransitionVertexNode, *TVertexNode;
//Petri网的图
typedef struct
{
int placesnum = 0;
int arcsnum = 0;
PlaceVertexNode placevertexNode[300];
TransitionVertexNode transitionvertexNode[300];
}GraphList, *PGraphList;