예제 #1
0
        ///
        /// Default construcor
        ///
        public MainForm()
        {
            this.InitComponents();

            this.sConf = new SessionConfig(
                Defaults.Delay,
                Defaults.sessionCount,
                Defaults.sessionGenLimit
            );

            this.nConf = new NetworkConfig(
                Defaults.HNodes,
                Defaults.VNodes
            );

            this.vConf = new VertexConfig(
                Defaults.Buffer,
                Defaults.Base,
                Defaults.GenLimit,
                Defaults.MaxLoadRatio,
                null // the routing function depends on the network
            );

            //this.initSimulation();
        }
예제 #2
0
        public SettingsForm(
            SessionConfig _sConf,
            NetworkConfig _nConf,
            VertexConfig _vConf
            )
        {
            this.InitComponents();

            this.sConf = _sConf;
            this.nConf = _nConf;
            this.vConf = _vConf;

            // this.setValues();
        }
예제 #3
0
        public Network(NetworkConfig netcfg, VertexConfig vrtcfg/*, bool djekstra*/)
        {
            this.netConf = netcfg;

            int x = netConf.HNodes;
            int y = netConf.VNodes;

            this.msgList = new MessageList();
            this.vertexList = new VertexList(x * y);
            this.edgeList = new EdgeList((x-1)*y + (y-1)*x);

            // if !djekstra

            vrtcfg.RouteFunc = this.findRouteC;
            this.vrtConfig = vrtcfg;
            this.initVrtListCoord(x, y);
            this.initEdgeListCoord();
        }