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

📄 mbshelp.html

📁 java学习的好范例
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><body><a name="Top"></a><center>  <h1>Marine Biology Simulation Program:<br>  Using the Graphical User Interface</h1></center><p>The Advanced Placement&reg; Marine Biology Simulation case study is a simulation   program designed to help marine biologists study fish movement in a small, bounded   environment such as a lake or bay.&nbsp;</p><p>The simulation program is distributed with a graphical user interface (<code>MBSGUI</code>),   described in this help file.&nbsp; Topics include:</p><ul>  <li>Choosing an initial fish configuration file. (<a href="#Open">Open</a>)   </li>  <li>Running the simulation for one timestep or continuously. (<a href="#Step">Step/Run</a>)</li>  <li>Saving the state of the simulation for future use. (<a href="#Save">Save</a>)</li>  <li>Creating a new environment and populating it with fish.&nbsp; (<a href="#Create">Create</a>)</li>  <li>Seeding the random number generator to get repeatable results. (<a href="#Seed">Seed</a>)</li>  <li>Viewing large environments. (<a href="#View">View</a>)</li>  <li>Customizing the graphical user interface.&nbsp; (<a href="#Advanced">Advanced     Features</a>)</li></ul><table width="90%" align="center" border="1"><tr>    <td>       <h4><i>Notes:</i></h4>      <ol>        <li>This document does not describe how to compile and run the Marine           Biology Simulation program, which depends on the specific type of computer           and software you are using.&nbsp; Information on compiling and running           the program on a number of common platforms can be found in the <code>ExecutionInformation</code>           folder under the main <code>JavaMBS</code> folder.&nbsp; The actual           case study document can be found in the <code>Narrative</code> folder.</li>        <li>You may run the Marine Biology Simulation program using the graphical           user interface described in this document or using an interface provided           from another source.&nbsp; The Advanced Placement exam will not test           students on the specifics of the graphical user interface.&nbsp; See           the Introduction to the case study document for more information on           what may be covered on the exam.</li>      </ol>    </td>  </tr></table><h3><a name="Open"></a>Opening an existing initial configuration file</h3>  <p> The Marine Biology Simulation (MBS) case study is distributed with a number   of initial configuration files in the <code>DataFiles</code> folder, including   the <code>fish.dat</code>, <code>manyFish.dat</code>, and <code>onefish.dat</code>   files mentioned in Chapter 1.&nbsp; (You may not see the <code>.dat</code> extensions   if your computer environment doesn't show them automatically.)&nbsp; To choose   an initial configuration file: </p><UL>  <LI>Select the &quot;Open environment file...&quot; item from the File menu.   <LI>In the dialog box (window) that comes up, select the configuration file     you want (such as &quot;<code>fish.dat</code>&quot;) from the <code>DataFiles</code>     folder.     <p> The dialog box will come up in the program's current execution folder,       so you will probably have to navigate to the <code>DataFiles</code> folder       to find the initial configuration files.&nbsp; Depending on how and where       you are running the program, its current directory may be the <code>JavaMBS</code>       folder or one of the other folders under it, such as the <code>Code</code>       folder, the <code>ExecutionInformation</code> folder, or a project folder       under either <code>Code</code> or <code>ExecutionInformation</code> (or       possibly some other folder altogether).&nbsp; <code>DataFiles</code> is       another of the folders under the <code>JavaMBS</code> folder, so you will       need to first navigate to the <code>JavaMBS</code> folder and then to the       <code>DataFiles</code> folder. &nbsp; Then select the configuration file       you want to open.     <p>The configuration files in the <code>DataFiles</code> folder represent       bounded environments. If you wish to read in a configuration file for an       unbounded environment (see Chapter 5 of the MBS case study), navigate to       the <code>UnboundedEnvDataFiles</code> folder in the <code>DataFiles</code>       folder and select a configuration file from there. </UL><p>The program will display the environment for the configuration file you chose   as a rectangular grid of locations, with fish in the locations specified in   the initial configuration file.</p><p><a href="#Top">(Go to top of help file.)</a></p><h3><a name="Step"></a>Running the simulation</h3>  <p>You can run the Marine Biology Simulation program one timestep at a time, or   continuously for many timesteps.</p><ul>  <li><b>To run the program one step at a time,</b> click on the Step button.&nbsp;     Each time you click on the Step button, the program will run one timestep     in the simulation, with fish moving from cell to cell in the grid.&nbsp; See     Chapters 1 and 2 of the MBS case study for more information about how fish     move in the simulation.</li>  <li><b>To run the program continuously for many timesteps,</b> click on the     Run button.&nbsp; Click on the Stop button to stop the simulation.&nbsp; You     can then click on either Step or Run to continue the simulation for one more     timestep or for many timesteps.&nbsp; You can adjust the speed of the simulation     by dragging the indicator on the Slow/Fast slider to the left or right.	<p>By default, the Run button will cause the simulation to run indefinitely,       until you select Stop.&nbsp; You can also run the simulation for a specific       number of steps.&nbsp; If you choose &quot;Use fixed number of steps...&quot;       from the Run menu, you will be prompted for a certain number of steps.&nbsp;       If you specify a number and click on OK, you will notice the label on the       Run button change.&nbsp; For example, if you chose 10 steps, the button       will read &quot;Run for 10 steps.&quot;&nbsp; When you click on the button,       it will run for 10 timesteps, or until you select Stop.&nbsp; If you choose       &quot;Prompt for number of steps&quot; from the Run menu, the label on the       Run button will change to &quot;Run...&quot; and you will be prompted for       the number of steps every time you click on it.&nbsp; Again, the program       will run that number of timesteps unless you select Stop.&nbsp; To return       to running the simulation continuously, choose &quot;Run Indefinitely&quot;       from the Run menu.</p>  </li></ul><p><a href="#Top">(Go to top of help file.)</a></p><h3><a name="Save"></a>Saving the current state as a new configuration file</h3>  <p>At any time while running the Marine Biology Simulation program, you can save   the current state of the environment as a configuration file.&nbsp; You can   then use this file later as an initial configuration file for a new run of the   simulation, to continue the current run of the simulation, or to compare results   from a different run of the simulation (see Chapters 3 and 4 of the MBS case   study for more information about <i>regression testing</i>).</p><UL>  <LI>Select &quot;Save environment as...&quot; from the File menu.   <LI>A dialog box will come up in the program's current execution folder. &nbsp;     Navigate to the folder where you want to save the new configuration file.   <LI>Give the new file a name, such as <code>myConfigFile.dat</code>.&nbsp;(     If you don't specify a <code>.dat</code> extension, the program will add it.&nbsp;     Again, you may not see the <code>.dat</code> extension if your computer environment     doesn't display file extensions.)&nbsp; If you try to save to a file that     already exists, the program will verify that you wish to replace the existing     file. </UL><p><a href="#Top">(Go to top of help file.)</a></p><h3><a name="Create"></a>Creating and populating a new environment</h3>  <p>You can use the graphical user interface for the Marine Biology Simulation   program to create new environments in several ways.&nbsp; You can open an initial   configuration file, run it for several timesteps, and then save that environment   to a file.&nbsp; (See &quot;<a href="#Open">Opening an existing initial configuration   file</a>,&quot; &quot;<a href="#Step">Running the simulation</a>,&quot; and   &quot;<a href="#Save">Saving the current state as a new configuration file</a>.&quot;)&nbsp;   You can also create a new environment from scratch, specifying the size of the   environment and the initial locations and directions of all the fish in it.&nbsp;   Or, you can edit the current state of an environment, adding and removing fish.&nbsp;   This section describes creating new environments and editing environments.</p><h4>Creating a new environment:</h4><UL>  <LI>Select &quot;Create new environment...&quot; from the File menu.   <LI>Choose the environment type.&nbsp; For Chapters 1 - 4 of the Marine Biology     Simulation case study, you can use the default &quot;BoundedEnv&quot; choice     without doing anything.&nbsp; For Chapter 5, choose whichever environment     type you want to create.&nbsp; The choices will be the &quot;BoundedEnv&quot;     and &quot;UnboundedEnv&quot; types, unless you specify additional environment     types in the <code>main</code> method of the <code>MBSGUI</code> class (see     &quot;<a href="#Advanced">Customizing the graphical user interface</a>&quot;).   <LI>If you choose the &quot;BoundedEnv&quot; environment type, you will be prompted     to specify the number of rows and columns in the bounded environment.&nbsp;     The program will use the default values shown in the text fields if you do     not change them.  <LI>Click on the Create button.  <LI>Add and remove fish as described below. </UL><h4>Editing an existing environment:</h4><UL>  <LI>Select &quot;Edit environment...&quot; from the File menu.   <LI>Add and remove fish as described below.&nbsp; (You cannot change the type     or size of the environment using the &quot;Edit environment...&quot; feature.) </UL>

⌨️ 快捷键说明

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