private void createStack(Protocol[] stack) throws Exception {
a1=new IpAddress(1111);
members=new Vector();
members.add(a1);
v=new View(a1, 1, members);
simulator=new Simulator();
simulator.setLocalAddress(a1);
simulator.setView(v);
simulator.addMember(a1);
simulator.setProtocolStack(stack);
simulator.start();