⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 startimmunitysystem.java

📁 利用系统仿真软件swarm及Java的swarm库对人体的免疫功能进行模拟
💻 JAVA
字号:
import swarm.Globals;

public class StartImmunitySystem {
    /** The main() function is the top-level place where everything
        starts.  For a typical Swarm simulation, in main() you create
        a toplevel Swarm, let it build and activate, and set it to
        running.  */
    public static void main (String[] args) {
        // Swarm initialization: all Swarm apps must call this first.
        Globals.env.initSwarm ("jheatbugs", "2.1", "bug-swarm@swarm.org", args);
        
        // swarmGUIMode is set in initSwarm(). It's set to be `false'
        // if you typed `heatbugs --batchmode' or `heatbugs
        // -b'. Otherwise, it's set to `true'.

        if (Globals.env.guiFlag) {
            // We've got graphics, so make a full ObserverSwarm to get
            // GUI objects
            ObserverImmunitySystem topLevelSwarm = 
                new ObserverImmunitySystem (Globals.env.globalZone);
            Globals.env.setWindowGeometryRecordName (topLevelSwarm, "topLevelSwarm");
 System.out.println("1");           
            topLevelSwarm.buildObjects ();
 System.out.println("2"); 
            topLevelSwarm.buildActions ();

 System.out.println("3"); 
            topLevelSwarm.activateIn (null);

 System.out.println("4"); 
            topLevelSwarm.go ();
            topLevelSwarm.drop ();
        }
        else {
        	ObserverImmunitySystem topLevelSwarm =
                (ObserverImmunitySystem) Globals.env.lispAppArchiver.getWithZone$key
                (Globals.env.globalZone, "batchSwarm");
            topLevelSwarm.buildObjects ();
            topLevelSwarm.buildActions ();
            topLevelSwarm.activateIn (null);
            topLevelSwarm.go ();
            topLevelSwarm.drop ();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -