亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? petrinet.java

?? Petri網繪制圖形、仿真、計算工具。可用于進行結構分析和性能分析。
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        return places [i] . removeToken();    } /* end removeTokenFromPlaceAt */    /*        select a place for adding an arc. if more than one place        exist at that location, the one with the lowest id will be marked.    */    public boolean selectNewArcPlace (int x, int y)    {        newArcPlace = locatePlace (x, y);        if (newArcPlace == (Place) null)            return false;        /* highlight the place and update the hint line */        newArcPlace . highlightOn ();		if (! newArcDirectionSet) {	    newArcToPlace = false;	    newArcDirectionSet = true;	}        return true;    } /* end selectNewArcPlace */    /*        select a transition for adding an arc. if more than one transition        exist at that location, the one with the lowest id will be marked.    */    public boolean selectNewArcTransition (int x, int y)    {        newArcTransition = locateTransition (x, y);        if (newArcTransition == (Transition) null)            return false;        /* highlight the Transition and update the hint line */        newArcTransition . highlightOn ();	if (! newArcDirectionSet) {	    newArcToPlace = true;	    newArcDirectionSet = true;	}        return true;    } /* end selectNewArcTransition */    /*        add arc between the specified place and transition.    */    public void addArc ()    {	if (newArcPlace != (Place) null && newArcTransition != (Transition) null)	{	    if (newArcToPlace)			newArcTransition . addArcOut (newArcPlace);	    else	newArcPlace . addArc (newArcTransition);	    newArcPlace = (Place) null;	    newArcTransition = (Transition) null;	}	newArcDirectionSet = false;    } /* end addArc */    /*        remove arc between the specified place and transition.    */    public void removeArc ()    {	if (newArcPlace != (Place) null && newArcTransition != (Transition) null)	{	    if (newArcToPlace)			newArcTransition . removeArcOut (newArcPlace);	    else	newArcPlace . removeArc (newArcTransition);	    newArcPlace = (Place) null;	    newArcTransition = (Transition) null;	}	newArcDirectionSet = false;    } /* end removeArc */    /*        select the place or transition for dragging. if more than one state have these        coordinates, the one with the lowest id will be selected.    */    public boolean selectDrag (int x, int y)    {        dragPlace = locatePlace (x, y);        if (dragPlace == (Place) null) {	    dragTransition = locateTransition (x, y);	    if (dragTransition == (Transition) null) {		return false;	    }	    else {		dragTransition . dragStart (x, y);		return true;	    }	}	else {	    dragPlace . dragStart (x, y);	    return true;	}    } /* end selectDrag */    /*        stop dragging the current place or transition.    */    public void deselectDrag (int x, int y)    {        if (dragPlace != (Place) null)	    dragPlace . dragStop (x, y);	else if (dragTransition != (Transition) null)	    dragTransition . dragStop (x, y);	dragPlace = (Place) null;	dragTransition = (Transition) null;    } /* end deselectDrag */    /*        drag the current drag state.    */    public void drag (int x, int y)    {        if (dragPlace != (Place) null)	    dragPlace . drag (x, y);	else if (dragTransition != (Transition) null)	    dragTransition . drag (x, y);    } /* end dragState */    /*        make sure simulation can be started (necessary conditions exist), stop        the previous one if necessary.    */    public int startSimulation ()    {        /* stop previous simulation */        stopSimulation ();        return STATUS_NORMAL;    } /* end startSimulation */    /*        stop simulation in progress.    */    public void stopSimulation ()    {    } /* end stopSimulation */    /*        run one round of simulation.    */    public int runSimulation ()    {	/* first, empty the set of activable transitions */	activableTransitions.setSize(0);	/* compute the set of activable transition */	for (int i = 0; i < TRANSITIONS && i < numTransitions; i ++) {	    if (transitions [i] == (Transition) null)		continue;	    if (transitions [i] . isActive())		activableTransitions.addElement((Object) (transitions[i]));	}	if ( activableTransitions.size() == 0 )	    return STATUS_NO_ACTIVABLE_TRANSITION;	/* choose a random transition */	int transitionNumber = (int) (wheelOfFortune.nextFloat() * activableTransitions.size());	/* fire the transition */	Transition toFire = (Transition) activableTransitions.elementAt(transitionNumber);	toFire . fire();	        return STATUS_NORMAL;    } /* end runSimulation */    /*        load new state machine from the specified file.    */    public synchronized int loadFile (String fileName)    {        FileInputStream file;        /* open the file, catching the file not found exception */        try        {            file = new FileInputStream (fileName);        }        catch (FileNotFoundException e)        {            return STATUS_FILE_NOT_FOUND;        }        /* read from the file catching the I/O error exception */        try        {            /* make sure the file was created by this program */            if (file . read () != CODE1 || file . read () != CODE2 ||                file . read () != CODE3 || file . read () != CODE4)            {                return STATUS_BAD_INPUT_FILE;            }            int val = 0;            /* while delimiter is not End Of Network - keep reading */            while (val != EON)            {                /* read the next delimiter */                val = file . read ();                /* if the delimiter marks Beginning Of Place information */                if (val == BOP)                {                    /* read the byte encoding place's id */                    val = file . read ();                    if (val < 0 || val >= PLACES)                        return STATUS_BAD_INPUT_FILE;                    /* create new state with this id. call the constructor                       that will initialize the state with the information                       from the file. */                    places [val] = new Place (val, file);                }                /* if the delimiter marks Beginning Of Input string */                else if (val == BOT)                {                    /* read the byte encoding place's id */                    val = file . read ();                    if (val < 0 || val >= TRANSITIONS)                        return STATUS_BAD_INPUT_FILE;                    /* create new state with this id. call the constructor                       that will initialize the state with the information                       from the file. */                    transitions [val] = new Transition (val, file);                }                /* any delimiter other than EON means garbage */                else if (val != EON)                    return STATUS_BAD_INPUT_FILE;            }            /* resolve place and transition IDs in arcs. transitions got initialized               with state IDs, not objects since some of them were read from the               file before the corresponding states. this step will resovle              that. */            numPlaces       = 0;            for (int i = 0; i < PLACES; i ++)            {                if (places [i] != (Place) null)                {                    numPlaces ++;                    places [i] . resolveId ((PlaceTransitionIdResolver) this);                }            }            numTransitions       = 0;            for (int i = 0; i < TRANSITIONS; i ++)            {                if (transitions [i] != (Transition) null)                {                    numTransitions ++;                    transitions [i] . resolveId ((PlaceTransitionIdResolver) this);                }            }        }        catch (IOException e)        {            return STATUS_READ_ERROR;        }        return STATUS_NORMAL;    } /* end loadFile */    /*        save current state machine data into specified file.    */    public int saveFile (String fileName)    {        FileOutputStream file;        /* open the output file catching the I/O error exception. */        try        {            file = new FileOutputStream (fileName);        }        catch (IOException e)        {            return STATUS_FILE_CREATE_ERROR;        }        /* write to file catching the I/O error exception. */        try        {            /* write out file signature */            file . write (CODE1);            file . write (CODE2);            file . write (CODE3);            file . write (CODE4);            /* write out place information */            for (int i = 0; i < PLACES; i ++)            {                if (places [i] == (Place) null)                    continue;                /* write Beginning Of Place delimiter and state id */                file . write (BOP);                file . write (i);                /* make state write its own information, throw I/O exception                   if the operation failed */                if (! places [i] . saveFile (file))                    throw new IOException ();            }            /* write out transition information */            for (int i = 0; i < TRANSITIONS; i ++)            {                if (transitions [i] == (Transition) null)                    continue;                /* write Beginning Of Transition delimiter and state id */                file . write (BOT);                file . write (i);                /* make state write its own information, throw I/O exception                   if the operation failed */                if (! transitions [i] . saveFile (file))                    throw new IOException ();            }            /* write End Of Network delimiter */            file . write (EON);        }        catch (IOException e)        {            return STATUS_WRITE_ERROR;        }        return STATUS_NORMAL;    } /* end saveFile */    /*        PRIVATE METHODS    */    /*        return place object at the specified location. if more that one place        are located in the same space, return the one with the lowest id.    */    private Place locatePlace (int x, int y)    {        for (int i = 0; i < PLACES; i ++)            if (places [i] != (Place) null && places [i] . inside (x, y))                return places [i];        return (Place) null;    } /* end locatePlace */    /*        return transition object at the specified location. if more that one trans        are located in the same space, return the one with the lowest id.    */    private Transition locateTransition (int x, int y)    {        for (int i = 0; i < TRANSITIONS; i ++)            if (transitions [i] != (Transition) null && transitions [i] . inside (x, y))                return transitions [i];        return (Transition) null;    } /* end locateTransition */} /* end PetriNet */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产三级国产普通话99 | 最新中文字幕一区二区三区| 99久久伊人精品| 天天影视涩香欲综合网| 欧美极品少妇xxxxⅹ高跟鞋| 欧美精品精品一区| 成人开心网精品视频| 日韩精品每日更新| 亚洲天堂2016| 国产欧美日韩三区| 91精品国产免费| 欧美性一区二区| 成人av手机在线观看| 青青草成人在线观看| 亚洲女人小视频在线观看| 26uuu亚洲婷婷狠狠天堂| 欧美最猛黑人xxxxx猛交| 国内精品久久久久影院薰衣草 | 欧美网站一区二区| 成人黄色小视频在线观看| 精品伊人久久久久7777人| 亚洲一区二区三区不卡国产欧美| 欧美极品美女视频| 26uuu亚洲| 欧美精品一区二区三区很污很色的| 欧美日韩一二区| 欧美在线观看视频一区二区| av亚洲精华国产精华精| 成人h精品动漫一区二区三区| 韩日av一区二区| 美女一区二区在线观看| 奇米影视在线99精品| 五月天网站亚洲| 国产一区二区精品久久99| 午夜视频一区二区三区| 亚洲激情网站免费观看| 欧美色综合网站| 在线亚洲+欧美+日本专区| 成年人网站91| jiyouzz国产精品久久| 波多野结衣中文字幕一区二区三区| 国产精品99久久久久久宅男| 国产精品18久久久久久久网站| 国内精品在线播放| 国产宾馆实践打屁股91| 成人黄色电影在线| 99久久精品99国产精品| 99视频超级精品| 日本高清不卡视频| 欧美精品xxxxbbbb| 欧美大片在线观看一区| 久久综合久久鬼色| 国产精品灌醉下药二区| 伊人一区二区三区| 午夜免费欧美电影| 免费观看日韩电影| 国产精品911| 91一区在线观看| 欧美视频在线一区| 91精品国产色综合久久久蜜香臀| 精品免费一区二区三区| 欧美国产日韩a欧美在线观看 | 91麻豆精品国产综合久久久久久| 制服.丝袜.亚洲.中文.综合| 精品国内二区三区| 国产亚洲精品7777| 亚洲欧美一区二区久久| 婷婷国产在线综合| 国产成人免费视| 日本高清不卡aⅴ免费网站| 91精选在线观看| 国产欧美日韩视频在线观看| 亚洲美女一区二区三区| 欧美aaa在线| 粉嫩蜜臀av国产精品网站| 欧美综合亚洲图片综合区| 欧美一区二区免费观在线| 欧美国产一区二区在线观看| 亚洲一区二区三区四区五区黄| 美女网站色91| 不卡欧美aaaaa| 欧美高清视频不卡网| 欧美高清在线一区| 婷婷开心激情综合| 不卡一卡二卡三乱码免费网站| 欧美日韩精品福利| ●精品国产综合乱码久久久久 | 奇米综合一区二区三区精品视频| 国产呦精品一区二区三区网站| 色婷婷精品大视频在线蜜桃视频| 欧美一区二区在线免费观看| 国产精品久久久一区麻豆最新章节| 亚洲电影激情视频网站| 国产精品一级黄| 制服丝袜亚洲精品中文字幕| 国产精品国产三级国产普通话99| 日韩avvvv在线播放| 95精品视频在线| 亚洲精品一区二区三区在线观看| 亚洲一区av在线| 成人免费高清在线| 精品国产乱码久久久久久牛牛 | 欧美色欧美亚洲另类二区| 国产欧美精品在线观看| 久久成人18免费观看| 欧美日韩精品免费| 亚洲视频在线一区二区| 国产一区视频网站| 日韩一区二区电影在线| 亚洲精品国产第一综合99久久 | 色网站国产精品| 中文一区二区在线观看| 久久99精品国产91久久来源| 7777女厕盗摄久久久| 亚洲精品成a人| 成人精品视频一区| 国产亚洲精品精华液| 久久91精品国产91久久小草| 欧美日韩国产高清一区二区三区| 亚洲精品免费视频| 91美女在线看| 亚洲人快播电影网| a4yy欧美一区二区三区| 欧美国产欧美亚州国产日韩mv天天看完整 | 蜜桃av噜噜一区二区三区小说| 97久久久精品综合88久久| 国产欧美一区二区精品婷婷 | 久久99九九99精品| 日韩欧美中文一区二区| 丝袜美腿亚洲一区二区图片| 欧美日韩中文国产| 亚洲国产综合人成综合网站| 欧美综合天天夜夜久久| 午夜在线电影亚洲一区| 欧美三区在线视频| 亚洲国产日韩a在线播放| 欧美日韩一区中文字幕| 亚洲国产一区在线观看| 欧美精品tushy高清| 日韩国产在线观看| 日韩欧美久久一区| 久久99九九99精品| 精品成人在线观看| 国产在线国偷精品免费看| 精品久久久久一区二区国产| 久久99久久99小草精品免视看| 久久久五月婷婷| 成人国产精品免费观看| 亚洲猫色日本管| 欧美性受xxxx| 麻豆成人av在线| 久久久久久久久一| 99re热视频这里只精品| 亚洲成人av福利| 日韩精品一区二区三区老鸭窝| 韩日精品视频一区| 国产精品久久毛片a| 欧洲一区二区三区免费视频| 日韩在线观看一区二区| www国产成人免费观看视频 深夜成人网| 韩国在线一区二区| 中文字幕在线播放不卡一区| 欧美日韩亚洲丝袜制服| 国产老肥熟一区二区三区| 亚洲私人黄色宅男| 91精品免费在线观看| 国产成人精品免费网站| 亚洲精品成人悠悠色影视| 91麻豆精品国产自产在线| 国产麻豆精品在线| 有坂深雪av一区二区精品| 欧美一卡在线观看| 成人视屏免费看| 日韩va亚洲va欧美va久久| 国产欧美日韩精品一区| 在线观看不卡一区| 久久 天天综合| 亚洲精品国产a| 精品日韩一区二区三区免费视频| 99热这里都是精品| 久久国产剧场电影| 亚洲精品视频免费观看| 日韩欧美国产综合在线一区二区三区| 国产风韵犹存在线视精品| 亚洲一区日韩精品中文字幕| 精品乱人伦小说| 色婷婷av一区二区三区大白胸| 美腿丝袜在线亚洲一区 | 天堂久久一区二区三区| 国产欧美一区二区精品秋霞影院| 日本精品视频一区二区| 国产精品性做久久久久久| 亚洲国产综合视频在线观看| 久久精品亚洲精品国产欧美kt∨| 欧美亚洲动漫制服丝袜| 国产成a人亚洲精品| 麻豆一区二区在线| 亚洲国产综合在线| 亚洲欧美日韩国产另类专区| 久久久五月婷婷|