COMP5211_Algorithms_2012 Semester 2_lec2
- 格式:pdf
- 大小:465.76 KB
- 文档页数:7
Installation GuideVersion 2012.2PetroModPetroMod petroleum systems modeling software PetroModPM*Mark of SchlumbergerCopyright © 2012 Schlumberger. All rights reserved.Copyright © 2012 Schlumberger. All rights reserved.This work contains the confidential and proprietary trade secrets of Schlumberger and may not be copied or stored in an information retrieval system, transferred, used, distributed, translated or retransmitted in any form or by any means, electronic or mechanical, in whole or in part, without the express written permission of the copyright owner.Trademarks & Service MarksSchlumberger, the Schlumberger logotype, and other words or symbols used to identify the products and services described herein are either trademarks, trade names or service marks of Schlumberger and its licensors, or are the property of their respective owners. These marks may not be copied, imitated or used, in whole or in part, without the express prior written permission of Schlumberger. In addition, covers, page headers, custom graphics, icons, and other design elements may be service marks, trademarks, and/or trade dress of Schlumberger, and may not be copied, imitated, or used, in whole or in part, without the express prior written permission of Schlumberger. Other company, product, and service names are the properties of their respective owners.An asterisk (*) is used throughout this document to designate a mark of Schlumberger.iv PetroMod 2012.2 Installation GuideContents1 Information Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1Schlumberger Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 About Schlumberger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Typestyle Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Alert Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2 Contacting Schlumberger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3 Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-32 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-43 Installation (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1Downloading the Installation Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3 Files Installed During Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6 Optional: Installing Runtime Environment for Parallel Processing . . . . . . . . . . . . . . . . . . . . . . . .3-7 Installing Runtime Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7 Activating Parallel Processing in the PetroMod Simulation Interface . . . . . . . . . . . . . . . . . . .3-7 Installing the Licensing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 CodeMeter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 Schlumberger Licensing Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 Configuring the PetroMod License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Before you start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Obtaining the license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13 Activating a local license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 Activating an external license server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Checking the License Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16Contents v4 Uninstalling PetroMod (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1Uninstalling PetroMod (Windows) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Uninstalling PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2 Results of the Uninstallation Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-25 Installation (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1Downloading the Installation Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 Installing PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-3 Files Installed During Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4 Parallel Processing Set-up (Systems Admin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 Intel MPI runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 PetroMod Machine Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6 Configuring users for ssh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7 Configuring users for rsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-7 Activating Parallel Processing in PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8 Load Sharing Facility (LSF) in Conjunction with Parallel PetroMod . . . . . . . . . . . . . . . . . . . . . . .5-9 Editing the MPI location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9 Intel MPI Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-9 Running Parallel PetroMod with Queuing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Running PetroMod Software with LSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 Configuring the License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Setting the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Obtaining a License Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-12 Setting up the License Server (Systems Administrator) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-136 Uninstalling PetroMod (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1Uninstalling PetroMod (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Uninstalling PetroMod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2 Files Removed During Uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2vi PetroMod 2012.2 Installation Guide1Information ResourcesIn This SectionSchlumberger Product Documentation.........................................................1-2About Schlumberger.............................................................................1-2Documentation.....................................................................................1-2Typestyle Conventions..........................................................................1-2Alert Statements..................................................................................1-2 Contacting Schlumberger............................................................................1-3Technical Support.................................................................................1-3Information Resources 1-1Schlumberger Product Documentation1-2PetroMod 2012.2 Installation GuideSchlumberger Product DocumentationAbout Schlumberger Schlumberger is the leading oilfield services provider, trusted to deliver superiorresults and improved E&P performance for oil and gas companies around the world.Through our well site operations and in our research and engineering facilities, wedevelop products, services, and solutions that optimize customer performance in asafe and environmentally sound manner.Documentation Documentation is provided in the following electronic formats via the listed location:•PetroMod 2012.2 Installation Guide (Adobe ® Acrobat ® PDF file):https://•PetroMod 2012.2 User Guides (Adobe ® Acrobat ® PDF files):https://•Online help for some applications: PetroMod -> HelpYou must have Adobe ® Reader ® installed to read the PDF files. Adobe Readerinstallation programs for common operating systems are available for a freedownload from the Adobe Web site at .Typestyle Conventions The following conventions are observed throughout this guide:•Bold text is used to designate file and folder names, dialog titles, names ofbuttons, icons, and menus, and terms that are objects of a user selection.•Italic text is used for word emphasis, defined terms, and manual titles.•Monospace text (Courier ) is used to show literal text as you would enter it, or asit would appear onscreen.Alert Statements The alerting statements are Notes, Cautions, and Warnings. These statements areformatted in the following style:• • • • • •Note:Information that is incidental to the main text flow, or to an important pointor tip provided in addition to the previous statement or instruction.• • • • • •Caution:Advises of machine or data error that could occur should the user fail totake or avoid a specified action.• • • • • •Warning:Requires immediate action by the user to prevent actual loss of data orwhere an action is irreversible, or when physical damage to themachine or devices is possible.Contacting SchlumbergerInformation Resources 1-3Contacting SchlumbergerTechnical Support Schlumberger has sales and support offices around the world. For information oncontacting Schlumberger, please refer to the information below.For Technical Support for PetroMod software please contact the Customer CareCenter via the Schlumberger Support Portal at https://Internet Postal Mail SchlumbergerAachen Technology Center (AaTC)Ritterstr . 2352072 Aachen - GermanyContacting Schlumberger1-4PetroMod 2012.2 Installation Guide2Getting StartedIn This ChapterOverview...................................................................................................2-2Introduction.........................................................................................2-2System Requirements...........................................................................2-2System Requirements...........................................................................2-2Licensing.............................................................................................2-4Getting Started 2-1Overview2-2PetroMod 2012.2 Installation GuideOverviewIntroduction This document describes the steps necessary to install PetroMod* 2012.2. Theinstaller includes a full PetroMod installation.•Installing on a workstation using a local license•Installing on a workstation using a license on a central license serverThis guide also explains the procedures required after installation:•Defining your license environmentThis module has been designed by the Schlumberger Aachen Technology Center(AaTC), Germany.Note:The screen shots in this document show PetroMod 2012.1.Audience This guide is useful for the following people:•PetroMod users who install PetroMod on their workstations•System Administrator who installs PetroMod on a network shared diskSystem Requirements Before you install PetroMod 2012.2 your machine must meet the followingrequirements:Hardware Requirements Table 2-1Hardware Requirements for workstation (e.g. Dell T7500)Table 2-2Hardware Requirements for laptop (e.g. Dell M4600)Computer CPU 2 x Intel X5667 (quad core) or X5675 (hexa core)Physical Memory12 GB RAM Hard Disk Space 5 GB of free disk space Graphic CardNvidia Quadro 5000 Network Card 1000 Mbit NicComputerIntel Core i7-2860Q 2.5 GHz Physical Memory 16 GB RAMOverview Getting Started 2-3Table 2-3Hardware Requirements for Linux Cluster • • • • • •Warning:Linux Users - Due to known issues concerning the instability ofOpenGL graphics, PetroMod only supports local rendering on 3Dgraphic cards with stable graphic drivers. Rendering via a networkcould cause stability issues. In particular, we observed problems withthe Mesa OpenGL package that is delivered with RHEL5 and works asa fall-back when no other driver is installed.Software Requirements Table 2-4Software Requirements• • • • • •Caution:It is possible that graphics do not display correctly when using older ATIgraphics cards and drivers. Thus, we recommend the use of Nvidiagraphics cards. We also recommend to install the latest graphicsdrivers available from Nvidia to avoid OpenGL graphic display errors.The driver version that comes with the OS in most cases is quite old oreven generic drivers are used if the graphics hardware is notrecognized correctly during the installation of the OS. These driversonly support basic functionalities and do not offer the OpenGL featuresrequired by PetroMod. Please be aware that most onboard graphicshardware does not support OpenGL at all. A dedicated graphics card isrequired for PetroMod.Hard Disk Space5 GB of free disk space Graphic Card Nvidia Quadro 2000M Computer CPU 2 x Intel X5667 (quad core) or X5675 (hexa core)Physical Memory48GB RAM Network Card1000 Mbit Nic Hard Disk Space 5 GB of free disk spaceMicrosoft Vista64-bit Microsoft Windows 7(recommended)64-bit RedHat EnterpriseLinux 5.3(recommended)64 bit Framework 2.0Overview••••••Note:Software applications created under older operating system versions willrun under newer operating system versions, but not vice versa. Licensing Licenses are required to access PetroMod. Certain functionalities or modules willonly be available with the respective licenses. Contact your Schlumberger SISCustomer Support representative to obtain the necessary licensesMaintenance contracts are usually yearly contracts, renewed at any time during theyear. Prior to 2012.1, PetroMod licenses allowed you to step up to a new PetroModversion based on the PetroMod license expiration date without having a validmaintenance contract. Beginning with 2012.1, upgrades are based on yourmaintenance contract expiration date. This is how you read the new licensingformat:FEATURE petrobuilder3D slbsls <yyyy.mm> <dd-mmm-yyyy> <#>Where• <yyyy.mm> is the maintenance expiration year and month• <dd-mmm-yyyy> is the license expiration day, month, year• <#> is the number of licensesMaintenance renewal is required to run any PetroMod version released after yourmaintenance expiration date. You will be automatically contacted by SchlumbergerInformation Systems before your maintenance expires.2-4PetroMod 2012.2 Installation Guide3Installation (Windows)In This ChapterDownloading the Installation Package..........................................................3-2Installing PetroMod.....................................................................................3-3Installing PetroMod...............................................................................3-3Files Installed During Installation...........................................................3-6 Optional: Installing Runtime Environment for Parallel Processing....................3-7Installing Runtime Environment.............................................................3-7Activating Parallel Processing in the PetroMod Simulation Interface..........3-7 Installing the Licensing Tool........................................................................3-9CodeMeter...........................................................................................3-9Schlumberger Licensing Tool................................................................3-10 Configuring the PetroMod License...............................................................3-13Before you start..................................................................................3-13Obtaining the license...........................................................................3-13Activating a local license......................................................................3-14Activating an external license server.....................................................3-15Checking the License Status.................................................................3-16Installation (Windows)3-1Downloading the Installation PackageDownloading the Installation PackageTo install PetroMod, you need the installation package. If you have a DVD, you canuse it. Otherwise, download PetroMod from the Software Download Center.••••••Note:If you are a new user of the Software Download Center, you must registerbefore you can download PetroMod.To download PetroMod 2012 from the Software Download Center1Go to .2Click SIS Software download center.3Log in to the site.4On the Welcome Message page, click Continue.5In the Product Group Name list (in the upper-left corner), click Geology &Geophysics.6In the table on the right, click PetroMod.7In the table of PetroMod downloads, click the Download icon for the PetroMod2012.2 file you need.You are ready to install PetroMod 2012.3-2PetroMod 2012.2 Installation GuideInstalling PetroModInstallation (Windows)3-3Installing PetroModPerform the following tasks prior to beginning the installation:•Ensure that you have admin privileges on the machine on which you are installing PetroMod and/or install the software together with your systems administrator since superuser passwords are required.•Ensure that the “System Requirements” on page 2-2 are met.PetroMod 2012 is a full installation. If you are already using an earlier PetroMod release, copy the new release into a new directory! Do not install the new version ‘over’ the old version to ensure that all programs and files can be updated and will then be compatible.Installing PetroMod The installation ensures that the files required to run PetroMod are installed on yourcomputer.To Install PetroMod 20121Insert the DVD or navigate to the location where you downloaded theinstallation files.2Double-click PetroMod2012.2.exe to start the installation. The folderPetroMod2012.2.msi will be unpacked, then the InstallShield Wizard will open, see Fig. 3-1. Click Next .Fig. 3-1PetroMod InstallShield Wizard3Fill in your User Name and Organization , see Fig. 3-2, then click Next.Installing PetroMod3-4PetroMod 2012.2 Installation GuideFig. 3-2Filling in user name and organization 4Determine the location of the files, see Fig. 3-3. Default is a folder calledSchlumberger in your Program Files folder. If this is not what you want you need to change that manually by clicking the Change button.When you are content with the location, click Next.Fig. 3-3Determining the location of the files 5 A summary of the settings will be displayed, see Fig. 3-4. Click Install .Installing PetroModInstallation (Windows)3-5Fig. 3-4Summary of settings 6You can follow the progress of the installation in the InstallShield Wizard, seeFig. 3-5.Fig. 3-5Installation progress 7Once the installation is complete the InstallShield Wizard will display the finaldialog, see Fig. 3-6. Click Finish .Installing PetroMod3-6PetroMod 2012.2 Installation Guide Fig. 3-6Installation complete 8The PetroMod 2012.2 icon will appear on your desktop . PetroMod 2012.2 willalso be added to the Schlumberger folder in the Progams list of your Start menu.Proceed with the installation of the .NETruntime environment, the MS HPC runtime for parallel processing and / or with installing Flexnet.Files Installed During Installation The following files / folders are installed during the installation of PetroMod:•one folder: PetroMod 2012.2:-client folder incl. sub folders/files-cult folder incl. sub folders/files-def folder incl. sub folders/files-doc folder incl. sub folders/files-geo folder incl. sub folders/files-well folder incl. sub folders/files-WIN64 folder incl. sub folders/files-PetroMod2012.2.batOptional: Installing Runtime Environment for Parallel Processing Optional: Installing Runtime Environment for Parallel ProcessingPetroMod 2012.2 supports parallel processing on Windows platforms usingMicrosoft HPC Pack 2008 R2 SP3. Using parallel processing from the SimulationInterface Microsoft requires the previous installation of Microsoft HPC runtimeenvironment.Installing Runtime Environment You can find the files in the installation package in the RuntimeEnvironment/ Windows folder:•mpi_x64.exe - MS MPI runtime•HpcClient_x64.exe - MS HPC web interface (optional)Once you have installed the files you need to obtain and activate the necessary licenses.••••••Note:If you want to consolidate your existing MS HPC runtime environments (installed with PM 11 or PetroMod 2011) to the latest version that shipswith PetroMod 2012.2, then you have to uninstall the MS HPC Pack 2008SDK on your system and manually set the required environment variable(called CCP_SDK) to C:\Program Files|Microsoft HPC Pack 2008 R2.Otherwise, PetroMod 2011.1 or PetroMod 11 SP4 will complain about themissing MPI runtime environment.Activating Parallel Processing in the PetroMod Simulation Interface 1After the licenses have been activated open the PetroMod Simulation Interface and select Processors for Parallel Run, see Fig. 3-7.Fig. 3-7Activating parallel processing in the PetroMod Simulation InterfaceOptional: Installing Runtime Environment for Parallel Processing2Increase the number of processors in the Processors Selection dialog.••••••Caution:Parallel processing is only supported on your local machine. Youcannot run a simulation on several nodes (as you could on Linuxclusters).Installing the Licensing Tool Installing the Licensing ToolPetroMod 2012 supports the use of the CodeMeter dongle as well as HOSTIDs forlicense authentication.•If you use CodeMeter, you must install CodeMeter software prior to installing theSchlumberger Licensing tool.•If you use HOSTIDs, you can continue by installing the Schlumberger Licensingtool.CodeMeter PetroMod 2012 uses the CodeMeter dongle for license authentication. Before youinsert your CodeMeter dongle into a USB port on your local workstation or on acentral license server, you must install the CodeMeter software. You should useCodeMeter 4.40 in the following circumstances:•If you use a local license (that is, your local workstation is your local licenseserver), install the CodeMeter dongle, appropriate CodeMeter driver, and theSchlumberger Licensing tool on your computer.•If you use a license on a central license server, the Administrator installs theCodeMeter dongle, CodeMeter driver, and the Schlumberger Licensing tool on theserver. Individual users do not need to install any licensing hardware or softwareon their computers.Installing CodeMeter Follow the steps in this section to uninstall previous versions of CodeMeter, andinstall the version required for this PetroMod release.◆To uninstall previous versions of CodeMeterIf you have an older version of CodeMeter installed on your computer, uninstall itand then install the latest version.1If you want to check the version of CodeMeter you are currently using beforeuninstalling it, on the Windows toolbar right-click the CodeMeter icon and selectAbout to open the About CodeMeter window.2Remove your CodeMeter dongle from the USB port.3Select Start > Control Panel > Programs and Features.4On the list of currently installed programs, select CodeMeter Runtime Kit vx.x.5Click Remove.You are ready to install the latest CodeMeter version.◆To install Codemeter••••••Note:CodeMeter automatically installs in your default Program Files directory:%program files%/Codemeter (usually C:/Program Files).1From the Licensing folder in the PetroMod installation package run the correctprogram (.exe) file:Installing the Licensing Tool•For PetroMod 64-bit, run CodeMeterRuntime64.exeAlternatively, go to the CodeMeter website () anddownload CodeMeter 4.40 from their website.The CodeMeter installation wizard opens.2On the Welcome panel, click Next.3On the License Agreement panel, read the agreement, select I accept thelicense agreement, and then click Next.4On the User Information panel, enter your name, your company’s name, andwho will use CodeMeter on your computer, and then click Next.5On the Select Features panel, select the features you want to install and thenclick Next.Schlumberger recommends that you accept the default settings.6On the Ready to Install panel, click Next to begin the installation.7When the installation is complete, on the last panel click Finish.8Restart your computer.The CodeMeter icon appears in your Windows taskbar. When you insert yourCodeMeter dongle into the USB port, the icon changes to show that your computerrecognizes the dongle. If you double-click the icon, you can view information aboutthe dongle.You are ready to install the Schlumberger Licensing tool.Schlumberger Licensing Tool PetroMod uses FlexNet for licensing. The Schlumberger Licensing tool is a simple interface for FlexNet. Using the Schlumberger Licensing 2012 tool to configure and manage your PetroMod license is recommended, but you may use FlexNet tools instead.If you do not already have the Schlumberger licensing tool on your computer, install the Licensing tool as follows:•If you use a local license (that is, your local workstation is your local license server), install the licensing tool on your computer.•If you use a license on a central license server, the Administrator installs the licensing tool on the server. The Schlumberger Licensing tool is not required for the Administrator to install, configure, and manage the PetroMod license. The Administrator may choose to manage PetroMod licenses with FlexNet native tools.The computer that you use to run the Schlumberger licensing tool is the license server for your PetroMod 2012 installaton.Installing the Schlumberger Licensing Tool Follow the steps in this section to install the Schlumberger Licensing tool. If you have a previous version of the licensing tool and want the latest version (2012), uninstall the older version first, and then install the latest version.。
Package‘RcppEnsmallen’November27,2023Title Header-Only C++Mathematical Optimization Library for'Armadillo'Version0.2.21.0.1Description'Ensmallen'is a templated C++mathematical optimization library (by the'MLPACK'team)that provides a simple set of abstractions for writing anobjective function to optimize.Provided within are various standard andcutting-edge optimizers that include full-batch gradient descent techniques,small-batch techniques,gradient-free optimizers,and constrained optimization.The'RcppEnsmallen'package includes the headerfiles from the'Ensmallen'library and pairs the appropriate headerfiles from'armadillo'through the'RcppArmadillo'package.Therefore,users do not need to install'Ensmallen'nor'Armadillo'to use'RcppEnsmallen'.Note that'Ensmallen'is licensed under3-Clause BSD,'Armadillo'starting from7.800.0is licensed under Apache License2, 'RcppArmadillo'(the'Rcpp'bindings/bridge to'Armadillo')is licensed underthe GNU GPL version2or later.Thus,'RcppEnsmallen'is also licensed undersimilar terms.Note that'Ensmallen'requires a compiler that supports'C++11'and'Armadillo'9.800or later.Depends R(>=4.0.0)License GPL(>=2)URL https:///coatless-rpkg/rcppensmallen,https:///rcppensmallen/,https:///mlpack/ensmallen,https:/// BugReports https:///coatless-rpkg/rcppensmallen/issues Encoding UTF-8LinkingTo Rcpp,RcppArmadillo(>=0.9.800.0.0)Imports RcppRoxygenNote7.2.3Suggests knitr,rmarkdownVignetteBuilder knitrNeedsCompilation yes12RcppEnsmallen-package Author James Joseph Balamuta[aut,cre,cph](<https:///0000-0003-2826-8458>),Dirk Eddelbuettel[aut,cph](<https:///0000-0001-6419-907X>)Maintainer James Joseph Balamuta<*********************>Repository CRANDate/Publication2023-11-2721:20:03UTCR topics documented:RcppEnsmallen-package (2)lin_reg_lbfgs (3)Index5 RcppEnsmallen-package RcppEnsmallen:Header-Only C++Mathematical Optimization Li-brary for’Armadillo’Description’Ensmallen’is a templated C++mathematical optimization library(by the’MLPACK’team)that provides a simple set of abstractions for writing an objective function to optimize.Provided within are various standard and cutting-edge optimizers that include full-batch gradient descent techniques, small-batch techniques,gradient-free optimizers,and constrained optimization.The’RcppEns-mallen’package includes the headerfiles from the’Ensmallen’library and pairs the appropriate headerfiles from’armadillo’through the’RcppArmadillo’package.Therefore,users do not need to install’Ensmallen’nor’Armadillo’to use’RcppEnsmallen’.Note that’Ensmallen’is licensed under3-Clause BSD,’Armadillo’starting from7.800.0is licensed under Apache License2,’Rcp-pArmadillo’(the’Rcpp’bindings/bridge to’Armadillo’)is licensed under the GNU GPL version2 or later.Thus,’RcppEnsmallen’is also licensed under similar terms.Note that’Ensmallen’requiresa compiler that supports’C++11’and’Armadillo’9.800or later.Author(s)Maintainer:James Joseph Balamuta<*********************>(ORCID)[copyright holder] Authors:•Dirk Eddelbuettel<**************>(ORCID)[copyright holder]See AlsoUseful links:•https:///coatless-rpkg/rcppensmallen•https:///rcppensmallen/•https:///mlpack/ensmallen•https:///•Report bugs at https:///coatless-rpkg/rcppensmallen/issues lin_reg_lbfgs Linear Regression with L-BFGSDescriptionSolves the Linear Regression’s Residual Sum of Squares using the L-BFGS optimizer. Usagelin_reg_lbfgs(X,y)ArgumentsX A matrix that is the Design Matrix for the regression problem.y A vec containing the response values.DetailsConsider the Residual Sum of Squares,also known as RSS,defined as:RSS(β)=(y−Xβ)T(y−Xβ)The objective function is defined as:f(β)=(y−Xβ)2The gradient is defined as:∂RSS=−2X T(y−Xβ)∂βValueThe estimatedβparameter values for the linear regression.Examples#Number of Pointsn=1000#Select beta parametersbeta=c(-2,1.5,3,8.2,6.6)#Number of Predictors(including intercept)p=length(beta)#Generate predictors from a normal distributionX_i=matrix(rnorm(n),ncol=p-1)#Add an interceptX=cbind(1,X_i)#Generate y valuesy=X%*%beta+rnorm(n/(p-1))#Run optimization with lbfgstheta_hat=lin_reg_lbfgs(X,y)#Verify parameters were recoveredcbind(actual=beta,estimated=theta_hat)Indexlin_reg_lbfgs,3RcppEnsmallen(RcppEnsmallen-package),2 RcppEnsmallen-package,25。
Common Mode Choke Coils for Signal Line SMDFEATURES•Although greatly miniaturized, this wire-wound chip-type filter maintains the characteristics needed for a common-mode filter. Common-mode impedance is 1000Ω [at 100MHz], so this filter is greatly effective in supporting noise.•Almost no affect upon even high speed signals since differential mode impedance is kept low.•This series includes both 2-line and 3-line types. They are used for various types of circuits and noise.APPLICATIONS•Used for radiation noise suppression for any electronic devices. •Used to counter common-mode noise affecting signals within high speed lines.•USB line for personal computers and peripheral equipment. •IEEE1394 line for personal computers, DVC, STB, etc.•LVDS, panel link line for liquid crystal display panels.SHAPES AND DIMENSIONS/CIRCUIT DIAGRAMS/RECOMMENDED PC BOARD PATTERNS 2-LINE TYPE ACM2012-2PPRODUCT IDENTIFICATION (1) Series name (2) Dimensions L ×W 2012: 2.0×1.2mm(3) Impedance[at 100MHz]900: 90Ω(4) Number of line 2P:2-line 3P:3-line(5) Packaging styleT: ø180mm reel taping TL: ø330mm reel taping (6) TDK internal code TEMPERATURE RANGESPACKAGING STYLE AND QUANTITIESACM2520-2PACM3225-2PACM 2012 -900-2P -T Operating–25 to +85°CPackaging styleType Reel QuantityTapingACM2012ø330mm 10000 pieces/reel ACM2520ø180mm 2000 pieces/reel ø330mm 10000 pieces/reelACM3225ø330mm 5000 pieces/reel ACM4532ø180mm 500 pieces/reelCommon Mode Choke Coils for Signal Line SMDSHAPES AND DIMENSIONS/CIRCUIT DIAGRAMS/RECOMMENDED PC BOARD PATTERNS 3-LINE TYPE ACM2520-3P ACM4532-102-3PELECTRICAL CHARACTERISTICSPart No.(Ω)typ.[100MHz](Ω)max.[Per 1line]Edc(V)max.Idc(A)max.2-LINEACM2012-201-2P 2000.25500.35ACM2520-451-2P 4500.4200.35ACM2520-601-2P 6000.45200.3ACM3225-800-2P 800.15200.4ACM3225-161-2P 1600.2200.353-LINECommon Mode Choke Coils for Signal Line SMDTYPICAL ELECTRICAL CHARACTERISTICSIMPEDANCE vs. FREQUENCY CHARACTERISTICS ACM2012-900-2P ACM2012-121-2PACM2012-201-2PACM2012-361-2PACM2520-301-2PACM2520-451-2PACM2520-601-2PACM2520-102-2PACM3225-800-2PACM3225-161-2PACM3225-271-2PACM3225-102-2PMEASURING CIRCUITS 2-LINECommon Mode Choke Coils for Signal LineSMDTYPICAL ELECTRICAL CHARACTERISTICSIMPEDANCE vs. FREQUENCY CHARACTERISTICS MEASURING CIRCUITS ACM2520-801-3P ACM4532-102-3P3-LINE。
glpkAPI–Quick StartGabriel Gelius-DietrichNovember10,20221IntroductionThe package glpkAPI provides a low level interface to the C API of GLPK1,the GNU Linear Programming Kit.It is similar in purpose to the package glpk2,but glpkAPI relies on a separate installation of GLPK.2InstallationThe package glpkAPI depends on a working installation of GLPK(in particular libraries and headerfiles).It is recommended to link GLPK to the GNU Multiple Precision Arithmetic Library Library(GMP)3in order to gain more performance when using the exact simplex algorithm.See INSTALL for installation instructions and platform specific details.CRAN4provides binary versions of glpkAPI for Windows and MacOS X,no other software is required here.3Usage3.1Creating and solving a linear optimization problemIn the following,an example lp-problem will be created and solved.It is the same lp-problem which is used in the GLPK manual:maximizez=10x1+6x2+4x3subject tox1+x2+x3≤10010x1+4x2+5x3≤6002x1+2x2+6x3≤300With all variables being non-negative.1Andrew Makhorin:GNU Linear Programming Kit,Version4.42(or higher)http://www.gnu.org/software/glpk/glpk.html 2Maintained by Lopaka Lee,available on CRAN /package=glpk3/4/1Load the library.>library(glpkAPI)Create an empty problem object.>prob<-initProbGLPK()Assign a name to the problem object.>setProbNameGLPK(prob,"sample")Set the direction of optimization.The object GLP_MAX is a predefined constant used by GLPK.A list of all available contants is written in the documentation glpkConstants. >setObjDirGLPK(prob,GLP_MAX)Add three rows and three colunms to the problem object.>addRowsGLPK(prob,3)[1]1>addColsGLPK(prob,3)[1]1Set row and column names.>setRowNameGLPK(prob,1,"p")>setRowNameGLPK(prob,2,"q")>setRowNameGLPK(prob,3,"r")>setColNameGLPK(prob,1,"x1")>setColNameGLPK(prob,2,"x2")>setColNameGLPK(prob,3,"x3")Set the type and bounds of the rows.>setRowBndGLPK(prob,1,GLP_UP,0,100)>setRowBndGLPK(prob,2,GLP_UP,0,600)>setRowBndGLPK(prob,3,GLP_UP,0,300)Set the type and bounds of rows using a function which has the ability to work with vectors.>lb<-c(0,0,0)>ub<-c(100,600,300)>type<-rep(GLP_UP,3)>setRowsBndsGLPK(prob,1:3,lb,ub,type)2Set the type and bounds of the columns.>setColBndGLPK(prob,1,GLP_LO,0,0)>setColBndGLPK(prob,2,GLP_LO,0,0)>setColBndGLPK(prob,3,GLP_LO,0,0)Set the objective function.>setObjCoefGLPK(prob,1,10)>setObjCoefGLPK(prob,2,6)>setObjCoefGLPK(prob,3,4)Set the type and bounds of columns and the objective function using a function which has the ability to work with vectors.>lb<-c(0,0,0)>ub<-lb>type<-rep(GLP_LO,3)>obj<-c(10,6,4)>setColsBndsObjCoefsGLPK(prob,1:3,lb,ub,obj,type)Load the constraint matrix.>ia<-c(1,1,1,2,3,2,3,2,3)>ja<-c(1,2,3,1,1,2,2,3,3)>ar<-c(1,1,1,10,2,4,2,5,6)>loadMatrixGLPK(prob,9,ia,ja,ar)Solve the problem using the simplex algorithm.>solveSimplexGLPK(prob)[1]0Retrieve the value of the objective function after optimization.>getObjValGLPK(prob)[1]733.3333Retrieve the values of the structural variables(columns)after optimization.>getColPrimGLPK(prob,1)[1]33.33333>getColPrimGLPK(prob,2)[1]66.666673>getColPrimGLPK(prob,3)[1]0Retrieve all primal values of the structural variables(columns)after optimization.>getColsPrimGLPK(prob)[1]33.3333366.666670.00000Retrieve all dual values of the structural variables(columns)after optimization(reduced costs).>getColsDualGLPK(prob)[1]0.0000000.000000-2.666667Print the solution to textfile sol.txt.>printSolGLPK(prob,"sol.txt")[1]0Write the problem tofile prob.lp in lp format.>writeLPGLPK(prob,"prob.lp")[1]0Read problem fromfile prob.lp in lp format.>lp<-initProbGLPK()>readLPGLPK(lp,"prob.lp")[1]0Free memory,allacated to the problem object.>delProbGLPK(prob)>delProbGLPK(lp)3.2Setting control prarmetersAll parameters and possible values are described in the documentation,see>help(glpkConstants)for details.The control parameters used by glpkAPI have the same names like those from GLPK,except that they are written in capital letters.For example,the parameter tm_lim in GLPK is TM_LIM in glpkAPI.The prarmeters are stored in a structure available only once per R session.Set the searching time limit to one second.>setSimplexParmGLPK(TM_LIM,1000)44Function names4.1SearchingThe function names in glpkAPI are different from the names in GLPK,e.g.the function addColsGLPK in glpkAPI is called glp_add_cols in GLPK.The directory inst/containes afile c2r.map which maps a GLPK function name to the corresponding glpkAPI function name.Additionally,all man-pages contain an alias to the GLPK function name.The call>help("glp_add_cols")will bring up the man-page of addColsGLPK.Keep in mind that most of the GLPK functions do not work on vectors.For example the function setColBndGLPK(which is glp_set_col_bnds in GLPK)sets the upper and lower bounds for exactly one column. The function setColsBndsGLPK in glpkAPI can handle a vector of column indices.Assume,we have a problem containing1000columns and600rows,with all variables having a lower bound of zero and an upper bound of25.The problem will be created as follows.>prob<-initProbGLPK()>addColsGLPK(prob,1000)[1]1>addRowsGLPK(prob,600)[1]1Now we can set the column bounds via mapply and setColBndGLPK.>system.time(+mapply(setColBndGLPK,j=1:1000,+MoreArgs=list(lp=prob,type=GLP_DB,lb=0,ub=25))+)User System verstrichen0.0080.0000.009Or we use the simpler call to setColsBndsGLPK.>system.time(+setColsBndsGLPK(prob,j=1:1000,+type=rep(GLP_DB,1000),+lb=rep(0,1000),+ub=rep(0,1000))+)User System verstrichen000The latter call is also much faster.54.2MappingThefile c2r.map in inst/maps the glpkAPI function names to the orininal GLPK function names of its C-API.To use the latter,run>c2r<-system.file(package="glpkAPI","c2r.map")>source(c2r)now either>pr1<-initProbGLPK()>delProbGLPK(pr1)or the original functions>pr2<-glp_create_prob()>glp_delete_prob(pr2)work both.Keep in mind that the mapping only affects the function names not the arguments of a function.6。
IBM Maximo Asset Configuration ManagerVersion 7.6.3Quick Start GuideThis guide introduces IBM Maximo Asset Configuration Manager Version 7.6.3, provides a link to a list of prerequisite software, gets you started with a typical installation, and provides a roadmap to other important information.National Language Version:To obtain the Quick Start Guide in other languages, print the language-specific PDF file from the installation media.Product overviewIBM®Maximo®Asset Configuration Manager provides organizations with features to manage the builds of high-value, complex, and regulated assets such as aircraft, locomotives, or missiles. Maximo Asset Configuration Manager is a rules-based configuration management system that is based on MIL-STD-1388-2B, a United States military standard that uses the Logistics Support Analysis Record (LSAR).Before you install the product, read the IBM Maximo Asset Configuration Manager version 7.6.3 Installation Guideexisting release notes for this product (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/common/relnotes.html). Release notes contain the latest information that is relevant to the installation of this product. If no additional information is available, this link returns no search results.For complete information, including installation instructions, see the Maximo Asset Configuration Manager in IBMKnowledge Center (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/welcome.html).2Step 2: Plan the installationYou install Maximo Asset Configuration Manager on a Microsoft Windows administrative workstation. Ensure that IBM Maximo Asset Management version 7.6.0.5 is installed on the same administrative workstation where you plan to install Maximo Asset Configuration Manager version 7.6.3, and in the same language as Maximo Asset Configuration Manager version 7.6.3.You must have system administrator rights and privileges to install the product.For information about the hardware, software, and network requirements for your product, see the System Requirements section in the Overview and Planning page on the Maximo Asset Management wiki (https:///developerworks/community/wikis/home?lang=en#!/wiki/IBM%20Maximo%20Asset%20Management/page/Overview%2 0and%20planning)3Step 3: Install the productTo install Maximo Asset Configuration Manager:1.Review the software requirements.2.If you are upgrading to Maximo Asset Configuration Manager version 7.6.3 from an earlier version of Maximo AssetConfiguration Manager, see the Upgrade Guide for IBM Maximo Products on the IBM Support Portal(/support/entry/portal/Overview/Software/Tivoli/Maximo_Asset_Management).3.Prepare to install.4.Install Maximo Asset Configuration Manager.5.For Oracle WebLogic Server environments only: you must deploy the Enterprise Application Archive (EAR) files.6.For the IBM WebSphere®Application Server environments: The EAR files are installed when you install the processautomation engine. If this task was deferred during the Maximo Asset Configuration Manager installation, deploy the EAR files.Detailed instructions are in the IBM Maximo Asset Configuration Manager 7.6.3 Installation Guide in IBM Knowledge Center (/support/knowledgecenter/SSLKSJ_7.6.3/com.ibm.acm.doc/welcome.html).IBM®More informationAfter you install the product, use IBM Knowledge Center to learn more about the product.For more information, see the following resources:v Product support (/support/entry/portal/Overview/Software/Tivoli/Maximo_Asset_Configuration_Manager)v IBM User Communities (https:///social/aggregator/ibm)Maximo Asset Configuration Manager Licensed Materials - Property of IBM. © Copyright IBM Corp. 2008, 2016. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.IBM, the IBM logo, and ®are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” (/legal/copytrade.shtml).Printed in Ireland。
matlab2012 运行节-回复IntroductionMATLAB is a programming language and development environment that is widely used in the fields of mathematics, engineering, and scientific research. It provides a flexible platform for data analysis, simulation, and visualization. In this article, we will explore the main features and functionalities of MATLAB 2012, and provide a step-by-step guide on how to run it effectively.Step 1: Installing MATLAB 2012To begin, you need to install MATLAB 2012 on your computer. The installation process is straightforward and involves running the MATLAB installer and following the on-screen instructions. Once the installation is complete, you can launch MATLAB 2012 by double-clicking on its icon.Step 2: Understanding the MATLAB EnvironmentOnce MATLAB 2012 is launched, you will be presented with the MATLAB desktop, which consists of several windows and panels.The main window is the Command Window, where you can directly enter MATLAB commands and execute them. Additionally, you will find the Current Folder window, which displays the files and folders in your current working directory. The Workspace window displays the variables and their values that are currently in memory. Finally, the Command History window shows the previously executed commands.Step 3: Running MATLAB CommandsMATLAB 2012 is an interactive environment, which means that you can enter commands directly into the Command Window and have them executed immediately. For example, you can perform basic operations such as addition, subtraction, multiplication, and division by simply entering the corresponding arithmetic expression.In addition to basic operations, MATLAB 2012 provides a wide range of built-in functions for mathematical computations, data analysis, and visualization. These functions can be called directly from the Command Window. For example, you can use the "sin" function to calculate the sine of an angle, or the "sqrt" function tocalculate the square root of a number.Step 4: Managing and Analyzing DataMATLAB 2012 provides powerful tools for manipulating and analyzing data. You can import data from various file formats, such as Excel spreadsheets or CSV files, into MATLAB using the "importdata" function. Once the data is imported, you can perform various operations on it, such as sorting, filtering, and aggregating.Furthermore, MATLAB 2012 provides numerous functions and tools for data visualization. You can create 2D and 3D plots, histograms, scatter plots, and more. These visualizations not only help in understanding the data but also make it easier to communicate the findings to others.Step 5: Writing MATLAB ScriptsWhile MATLAB 2012 allows you to execute commands directly in the Command Window, it also provides the ability to write and run scripts. A MATLAB script is a file that contains a series of MATLAB commands, which are executed in sequential order. Writing scriptscan be beneficial if you have a set of repetitive or complex calculations to perform.To create a MATLAB script, you need to use a text editor and save the file with a ".m" extension. Once the script is saved, you can execute it in MATLAB by typing the name of the script in the Command Window. The script will run, and the output (if any) will be displayed in the Command Window.ConclusionMATLAB 2012 is a powerful programming language and development environment that is widely used in various scientific and engineering fields. In this article, we have covered the main steps involved in running MATLAB 2012. We discussed the installation process, the MATLAB environment, executing commands, managing and analyzing data, and writing MATLAB scripts. By following these steps, you can effectively utilize MATLAB 2012 for various computational tasks and data analysis projects.。
字母不重复的子串-概述说明以及解释1.引言1.1 概述字母不重复的子串是指在一个字符串中,找出不包含重复字母的最长子串。
也就是说,子串中的每个字符在该子串中只出现一次。
这个问题在字符串处理和算法设计方面有着广泛的应用。
在实际生活中,我们经常需要处理包含字母的字符串,例如英文单词、句子甚至是DNA序列。
而找出其中不重复的子串,能够帮助我们理解字符串的特征和模式,从而进行更深入的分析和处理。
字母不重复的子串问题在实际应用中有着很广泛的应用。
以文本信息处理为例,比如在自然语言处理中,我们需要通过分析文本中的子串来提取关键词、识别命名实体等。
另外,在数据压缩和加密中,也经常需要使用字母不重复的子串来提高存储和传输的效率。
本文将深入探讨字母不重复的子串问题的意义和应用,并通过具体的算法设计与实例分析,展示如何高效地找出字母不重复的子串。
最后,我们将对问题进行总结,并展望未来该领域可能的发展方向。
让我们一起来探索吧!1.2 文章结构本文将分为三个主要部分进行讨论。
第一部分是引言部分。
在这部分中,我们将概述本文的主要内容,包括字母不重复的子串的概念和意义,以及本文的结构和目的。
第二部分是正文部分。
在这部分中,我们将详细讨论字母不重复的子串的意义和应用。
首先,我们将探讨字母不重复的子串在计算机科学领域的重要性,并介绍一些相关的算法和数据结构。
然后,我们将探讨字母不重复的子串在其他领域的应用,如自然语言处理、图像处理等。
通过这些案例研究,我们将阐述字母不重复的子串在现实生活中的实际应用和潜在价值。
第三部分是结论部分。
在这部分中,我们将对前文进行总结,并提出一些展望。
我们将回顾字母不重复的子串对于解决实际问题的作用,并讨论可能的未来研究方向。
我们还将提供一些实用建议,以帮助读者更好地理解和应用字母不重复的子串的概念。
通过以上结构,本文旨在全面介绍字母不重复的子串的意义和应用,并为读者提供深入理解和有效运用该概念的指导。
Package‘matlabr’October13,2022Type PackageTitle An Interface for MATLAB using System CallsVersion1.5.2Date2018-08-13Maintainer John Muschelli<*********************>Description Provides users to call MATLAB from using the``system''command.Allows users to submit lines of code or MATLAB mfiles.This is in comparison to'R.matlab',which creates a MATLAB server.Imports stringrLicense GPL-2Encoding UTF-8SystemRequirements MATLABBugReports https:///muschellij2/matlabr/issuesRoxygenNote6.1.0Suggests covrNeedsCompilation noAuthor John Muschelli[aut,cre]Repository CRANDate/Publication2018-08-1316:30:05UTCR topics documented:add_path (2)get_matlab (2)have_matlab (3)rmat_to_matlab_mat (4)run_matlab_code (4)run_matlab_script (5)rvec_to_matlab (6)rvec_to_matlabcell (6)rvec_to_matlabclist (7)12get_matlabIndex8 add_path Create PATHs to add to MATLAB PATHsDescriptionCreate PATHs to add to MATLAB PATHsUsageadd_path(path)gen_path(path)add_gen_path(path)Argumentspath path to addValueA character vectorExamplesadd_path("~/")gen_path("~/")gen_path("~/")get_matlab Find matlab pathDescriptionThis tries tofind matlab’s path using a system which command,and then,if not found,looks at getOption("matlab.path").If not path is found,it fails.Usageget_matlab(try_defaults=TRUE,desktop=FALSE,splash=FALSE,display=FALSE,wait=TRUE,single_thread=FALSE)have_matlab3Argumentstry_defaults(logical)If matlab is not found from Sys.which,and matlab.path not found, then try some default PATHs for Linux and OS X.desktop Should desktop be active for MATLAB?splash Should splash be active for MATLAB?display Should display be active for MATLAB?wait Should R wait for the command tofinish.Both passed to system and adds the -waitflag.single_thread Should theflag-singleCompThread be executed to limit MATLAB to a single computational thread?ValueCharacter of command for matlabExamplesif(have_matlab()){get_matlab()}have_matlab Logical check if MATLAB is accessibleDescriptionUses get_matlab to check if MATLAB’s path accessibleUsagehave_matlab()ValueLogical TRUE is MATLAB is accessible,FALSE if notExampleshave_matlab()4run_matlab_code rmat_to_matlab_mat Convert R matrix to matlab matrixDescriptionThis function takes in an R matrix then turns it into a matrix in matlabUsagermat_to_matlab_mat(x,matname=NULL,transpose=FALSE)Argumentsx matrix of valuesmatname Object in matlab to be assignedtranspose Transpose the matrixValueCharacter scalar of matlab coderun_matlab_code Runs matlab codeDescriptionThis function takes in matlab code,where the last line must end with a;,and returns the exit statusUsagerun_matlab_code(code,endlines=TRUE,verbose=TRUE,add_clear_all=FALSE,paths_to_add=NULL,...)Argumentscode Character vector of code.endlines Logical of whether the semicolon(;)should be pasted to each element of the vector.verbose Print outfilename to runadd_clear_all Add clear all;to the beginning of codepaths_to_add Character vector of PATHs to add to the script using add_path...Options passed to run_matlab_scriptrun_matlab_script5ValueExit status of matlab codeExamplesif(have_matlab()){run_matlab_code(c("disp( The version of the matlab is: )","disp(version)"),paths_to_add="~/")}##Not run:if(have_matlab()){run_matlab_code("disp(version)")run_matlab_code("disp(version)",paths_to_add="~/")run_matlab_code(c("x=5","disp([ The value of x is ,num2str(x)])")) }##End(Not run)run_matlab_script Run matlab scriptDescriptionThis function runs a matlab script,and returns exit statusesUsagerun_matlab_script(fname,verbose=TRUE,desktop=FALSE,splash=FALSE,display=FALSE,wait=TRUE,single_thread=FALSE,...)Argumentsfname Filename of matlab script(.mfile)verbose print diagnostic messagesdesktop Should desktop be active for MATLAB?splash Should splash be active for MATLAB?display Should display be active for MATLAB?wait Should R wait for the command tofinish.Both passed to system and adds the -waitflag.single_thread Should theflag-singleCompThread be executed to limit MATLAB to a single computational thread?...Options passed to systemValueExit status of matlab codervec_to_matlab Convert R vector to matlab cell matDescriptionThis function takes in an R numeric and returns a statusUsagervec_to_matlab(x,row=FALSE,sep=NULL,matname=NULL)Argumentsx Numeric vector of valuesrow Create row vector instead of column vectorsep separator to use to separate cells.Will override row argument matname Object in matlab to be assignedValueCharacter scalar of matlab codervec_to_matlabcell Convert R vector to matlab cellDescriptionThis function takes in an R vector then turns it into a cellUsagervec_to_matlabcell(x,sep=";",matname=NULL,transpose=FALSE)Argumentsx Character vector of valuessep separator to use to separate values.Defaults to";"argumentmatname Object in matlab to be assignedtranspose Transpose the cellValueCharacter scalar of matlab codervec_to_matlabclist Convert R vector to matlab cell matDescriptionThis function takes in an R vector then turns it into a cell listUsagervec_to_matlabclist(x,matname=NULL)Argumentsx Character vector of valuesmatname Object in matlab to be assignedValueCharacter scalar of matlab codeIndexadd_gen_path(add_path),2add_path,2,4gen_path(add_path),2get_matlab,2,3have_matlab,3rmat_to_matlab_mat,4run_matlab_code,4run_matlab_script,4,5rvec_to_matlab,6rvec_to_matlabcell,6rvec_to_matlabclist,7system,3,58。
课后习题-Ubuntu Linux 操作系统与实验教程(第2版)-微课-XXX-XXX2)Linux中的文件名不区分大小写。
3)Linux中的文件权限共有9个。
4)在Linux中,root用户具有最高权限。
5)Linux中的软链接和硬链接是完全相同的概念。
2、简答题1)什么是Linux文件系统?2)Linux中的文件权限包括哪些内容?3)如何修改文件的权限?4)什么是Linux中的软链接和硬链接?5)如何创建软链接和硬链接?3、实验题1)创建一个文件夹,设置文件夹的权限为777.2)创建一个文件,设置文件的权限为644.3)修改文件的权限为777.4)创建一个软链接和一个硬链接。
都可以存储在任意一个分区中。
3)在Linux系统中,用来管理文件系统的命令是。
4)在Linux系统中,用来查看文件系统使用情况的命令是。
5)在Linux系统中,用来挂载文件系统的命令是。
2、判断题1)在Linux系统中,可以使用mkfs命令来创建文件系统。
2)在Linux系统中,可以使用mount命令来挂载文件系统。
3)在Linux系统中,可以使用umount命令来卸载文件系统。
4)在Linux系统中,可以使用df命令来查看文件系统使用情况。
5)在Linux系统中,可以使用du命令来查看文件大小和占用空间。
3、简答题1)请简述文件系统的概念。
文件系统是操作系统中用来管理文件和目录的一种机制,它提供了一种组织和存储文件的方式,使得用户可以方便地访问和管理文件。
文件系统通常由文件和目录组成,它们被组织在一起形成了一个层次结构,用户可以通过路径名来访问它们。
2)请简述Linux系统中常用的文件系统类型。
Linux系统中常用的文件系统类型包括ext2、ext3、ext4、XFS、Btrfs等。
其中,ext2是最早的Linux文件系统,它支持最大2TB的文件系统和最大2GB的单个文件。
ext3是在ext2的基础上添加了日志功能,可以更好地保证文件系统的稳定性和安全性。
AS-International AssociationActuator Sensor Interface(AS-Interface®)Test Requirements MasterVersion 1.2, Revision 1.1Apr. 05, 2002ConfidentialFor internal use of the members only or for companies which have bought the documentation from the AssociationTest Requirements Master 1.2 Rev. 1.1AcceptanceThese test requirements have been accepted by the Technical Commission of the AS International Association in its meeting on April 10, 2002 and by the Management Committee in its meeting on May 14, 2002.File date: August 8th, 2002Test Requirements for AS-Interface MasterContents:A. General (1)1. Basic tests (4)2. Simplified test (4)3. Additional tests (4)4. Precedence (4)B. Test instructions (4)1. Test instruction: Current consumption (5)2. Test instruction: Noise emission AS-i master (8)3. Test instructions: Impedance and symmetry measurement (11)4. Test instruction: Power-on behaviour (21)5. Test instruction: Burst test (25)6. Test instruction: Analogue part (31)7. Test instruction: Voltage cutoff (34)8. Test instruction: Logical start-up behaviour (37)9. Test instruction: Logical behaviour in normal operation (40)10. Test instruction: Analogue profile (43)11. Test instruction: Functions in accordance with PICS (45)12. Test instruction: Time response (49)13. Test instruction: Security of data (52)C. Forms for technical reports (56)Annex: (77)Test Requirements Master 1.2 Rev. 1.1A. General1. Basic testsThese test requirements for the AS-Interface master describe the minimum extent of a basic test to be carried out on the AS-i master to section 4.4 (2) of the Certification Guidelines (ZRL) for AS-i products.AS-i masters forming a part of a higher-level system, e.g. couplers (gateways) to higher-level bus systems or masters with integrated host functions (AS-i control) are also tested in accordance with these test requirements if applicable. Host functions shall be accessible or realised in the higher-level system in accordance with these test requirements.If an AS-i power supply is integrated in the AS-i master, the master is additionally subject to the test requirements for AS-i power supplies.If the AS-i master contains components already tested and approved by the AS-i Association these components will not be tested again (section 4.4 (3) of the ZRL).All standard AS-i components used for testing purposes shall be AS-i certified.2. Simplified testSimplified tests to section 4.5 ZRL shall use parts of these test requirements if applicable.3. Additional testsIn special cases the test laboratory is entitled to execute additional tests beyond these test requirements in accordance with the valid specification or shall demand them from the manufacturer.4. PrecedenceIn the case of discrepancies between these test requirements and the AS-i specifications the complete specification takes precedence.instructionsB. TestAll tests described in these test requirements shall have an accuracy of 1% unless stated otherwise, and shall be documented accordingly in the test protocols.For test purposes, the connection between the master and the AS-i shall be made by means of a split plug.All logical tests shall be recorded via AS-i bus monitor. All recordings of the monitor are saved as a file on a diskette which shall be part of the test report. In the case of errors in the logical tests a printout of the monitor recordings shall be made additionally. To protect the files from corruption, a check sum shall be put on the contents of the files. The directory listing contents and check sum shall be enclosed with the test report.1. Test instruction: Current consumptionReference: Specification AS-i master (chapter 7 of the Complete Specification),Master profiles,Test requirements for AS-i power supplies1.1 GeneralThe test requirements allow measurement of the current consumption of an AS-i master. These test requirements become obsolete if the master has an integrated AS-i power supply. In that case, however, all tests of the test requirements for AS-i power supplies have to be additionally fulfilled by the master.The manufacturer shall provide the following information:1. current data sheet,used2. profile1.2 Test circuitFigure 1 shows the required test circuit.Figure 1: Test circuit for current consumption test1.3 Measuring and test equipment·AS-i reference network·AS-i data decoupling network· ammeter· oscilloscope·test circuit to figure 1·variable power supply1.4 Test procedure1. Set up test circuit to figure 12. Operate the master to be tested in normal operation3. Check the master functions at the following DC voltages on the AS-i-line: 31.6V,26.5V, 23.5V, 21.5V and again at 23.5V4. Check the maximum current consumption1.5 EvaluationThe maximum current consumption as stated by the manufacturer shall not be greater than the value stated in the data sheet or than the requirements of the specification.The function test at the operating voltage limits shall correspond to the data stated in the data sheets and the applicable specifications, i.e. at DC voltages on the AS-i line of 31.6V, 26.5Vmaster activity is detected by means of an oscilloscope directly on the AS-i line.Test recordingsDate:Tested by:Test laboratory:Test report no.:ofPage:Current consumptionTest piece code: ___________________Network configurationMaster: __________________________Power supply: __________________________ Data decoupling: ___________________ Slaves: __________________________Measured values:Voltage U /(V) 31.6 26.5 23.5 21.5 23.5Current I / (mA)Communication yes/no yes/no yes/no yes/no yes/nomax. current consumption: ______mA < current stated in data sheet:yes/noResult:Test passed: Yes / No Signature: _________________Test Requirements Master 1.2 Rev. 1.1 2. Test instruction: Noise emission AS-i masterReference: Specification AS-i master (chapter 7 of the Complete Specification),2.1 GeneralThis test instruction allows the measurement of the noise emission of an AS-i master in a power-fail state on the AS-i network.2.2 Test circuitFigure 1 shows the required test circuit.Figure 1: Test circuit noise emission AS-i masterThe change in current consumption in a master should only cause a noise voltage £ 50mVss on the AS-i line in the frequency range between 10kHz and 500kHz. The voltage on the AS-i line is measured by means of an oscilloscope via a bandpass (see figure 2, see spice simulation in the appendix to the test requirements for impedance and symmetry measurement). The oscilloscope is to be operated in the mode Envelope, Peak Detection on at a cut-off frequency > 10 MHz. The FET probe is to be terminated with an impedance of 50 Ohm. The test circuit is to be screened from noise so that the measured maximum noise voltage without the master is smaller than 15 mV. For this purpose, the cable length between master and AS-i equivalent line (see figure 3) is to be limited to max. 20 cm. The master is to be operated in the power-fail state (direct voltage on the AS-i line of 21 V).50 Ohm or AS-i 10 … 1MOhm 10 … 30 pFFigure 2: bandpass 10kHz ... 500kHzR = 0,125O hmL = 1,25 µHC=700 p FFigure 3: equivalent circuit of the 10m AS-i equivalent line2.3. Measuring and test equipment·AS-i power supply·oscilloscope with FET probe (50 Ohm output impedance)· bandpass·test circuit to figure 12.4 Test procedure1. Apply a voltage of 21 V to the AS-i line2. Measure the noise voltage without the master by means of the oscilloscope over 60seconds3. Connect the master4. Check the power-fail state of the master5. Measure the noise voltage with the master on the AS-i line by means of an oscilloscopeover 60 secondsThe measurements shall have an accuracy of 5%.2.5 EvaluationThe noise voltage on the AS-i line must not be increased by more than 50 mVss by the master in the power-fail state.Test Requirements Master 1.2 Rev. 1.1 Test recordingsDate:by:TestedTest laboratory:Test report no.:Page:of Noise emission AS-i masterTest piece code: ___________________Network configurationMaster: __________________________Power supply: _________________________Measured values:Noise voltage:without master: _______mVsswith master: _______mVss difference: ______ £ 50mVss : yes / noTest criteria: In the power-fail state the noise voltage of the master on the AS-i line must not exceed 50 mVss!Result:Test passed: Yes / No Signature: _________________3. Test instructions: Impedance and symmetry measurementReference: Specification AS-i master (chapter 7 of the Complete Specification),3.1. Impedance measurement3.1.1 GeneralThe impedance measurement of the master is to be performed in the "ready state" under laboratory conditions.An AC signal U~ with Ri £20 Ohm is to be superimposed on the AS-i DC voltage. This AC voltage and the resulting AC current I~ of the master are to be measured3.1.2 Test circuitFigure 1 shows the test circuit for the impedance measurement. The operation of the master in switch position "test" has been purposefully selected as asymmetrical, i.e. metal parts of the master must not be grounded. Switch S1 allows a switching of AC ground (switch position shown: AS-i- = GND).The AC input current I~ is measured by means of the current probe. The input impedance is calculated as follows:| Z | = | U~ | / | I~ |The distance to the AS-i master shall be 20 cm.The DC voltage is to be set to 21V to put the master in the offline state.3.1.3 Measuring and test equipment·power supply (universal)· signal generator· current probe·test circuit (IMP_SYM) to figure 1for point 3.2 (symmetry measurement)· FET probe· HF voltmeter· bandpassFigure 1: Test circuit impedance measurement (IMP_SYM)3.1.4 Test procedure·Switch S1: position "AS-i- = GND"·Determine the AC current I~ at U~ = 6 Vss·The measurement is to be carried out as described in chapter 7.2.1.1 of the Complete Specification.The accuracy of the measurements shall be within 3%.3.1.5 EvaluationThe evaluation is to be carried out as described in chapter 7.2.1.1 of the Complete Specification and must not exceed the limit values stated there.3.1.6 DC resistanceThe DC resistance between ASI+, ASI- and all metallic parts of the master with the exception of outer connections shall be ³ 250 kOhm.3.2. Symmetry measurement:3.2.1 General:Figure 2: Master connection for symmetry measurementThe partial impedances Z1 and Z2 respectively form a voltage divider at measurement point M. This measurement point may be the metallic housing or a metallic mounting plate. The measurement point shall be connected to the external supplies of the master or the host respectively.In the off-load state the currents through Z1 and Z2 are identical.For an asymmetry of 10% this means10.190.02121£=£Z Z U U r r .r U 1r: voltage between M and ASI+ for ASI+ = GNDU 2: voltage between M and ASI- for ASI- = GND3.2.3 Test circuit:Figure 3: Test circuit symmetry measurement of the AS-i master50 Ohm or AS-i10 … 1MOhm 10 … 30 pFFigure 4: bandpass 10 kHz ... 500 kHzThe test circuit corresponds to the one of the impedance measurement (compare figures 1 and 2). With the test circuit in figure 3 the voltage drops U1 of ASI+ to M and U2 of ASI- to M are determined by means of a FET probe (Ri=1MOhm//2pF) with AC coupling Ck ³1nF at an output impedance of 50 Ohm and an HF voltmeter (frequency range up to 300 kHz, Ri=10MOhm//30pF). The capacitance Ckomp=Cfet is to be taken into account in the circuit to compensate for the probe capacitance.By means of calibrating C 3, |U1| = |U2| = UE/2 can be achieved and the capacitances of C 1 and C 2 can be determined independent of Z.A possible measurement error of the HF voltmeter in higher frequency ranges is eliminated by means of the ratio |U1| / |U2|.The appendix shows the frequency response of the bandpass from a SPICE simulation with different combinations of the terminating resistor.3.2.4 Test procedure· Set a measurement voltage Ue of 2.0 Veff displayed on the evaluation meter at afrequency of 160 kHz· Determine |U1| and |U2| at a frequency of 300 kHz without C 3 · Check the condition10.190.02121£=£Z Z U U r r .· If this condition is met, determine at frequencies of 50kHz, 100kHz, 125kHz, 160kHz,200kHz, 300kHz and check if this condition is met.· for ASI+ = GND determine the frequency response of |U1| · for ASI- = GND determine the frequency response of |U2| · define the ratio |U1| / |U2| as stated in point 2.1 (General)·If the condition10.190.02121£=£Z Z U U r ris not met:· Add C3 between ASI+ and M or ASI- and M respectively, depending on the voltage testand calibrate until you reach |U1| = |U2| = UE/2 at a measurement frequency of 300kHz · Determine C3The accuracy of the measurements shall be within 3%.3.2.5 Evaluation / symmetry criteriaOne of the following conditions shall be met:1. 10.190.02121£=£Z Z U U r r or2.90.080.021££U U r r or 20.110.21££U U r 1r with C 3 £ 15 pF or3. 80.021£U U r r or 2120.1U U r r £ with C 3 £ 30 pFTest recordingsDate: Tested by: Test laboratory: Test report no.: Page: ofImpedance and symmetry measurementNetwork configurationMaster: _________________________ Test circuit: IMP_SYMImpedance measurement:R min L min C maxlimits5k W3mH 400pF measurementsTest criteria: R meas > R min ; L meas > L min ; C meas < C maxDC resistance (R ³ 250 kOhm): ASI+ - M: _______ ASI- - M: _______Symmetry measurement:f / (kHz) 50 100 125 160 200 300 |U1| / (V)|U2| / (V)|U1 / |U2||U1| / |U2| = ________ , C3=______ pFOne of the following conditions shall be met: 1.10.190.02121£=£Z Z U U r r2.90.080.021££U U r r or 20.110.21££U U r 1r withC 3 £ 15 pF or 3.80.021£U U r r or 2120.1U U r r £ with C 3 £ 30 pFSymmetry sufficient? yes/noResult:_________________ Yes/No Signature:passed:TestAppendix: Frequency responses bandpass with different terminating impedances4. Test instruction: Power-On behaviourReference: Specification ASI master (Chapter 7 of the Complete Specification),4.1 GeneralBy testing the Power-ON behaviour, the switch-on delay time t E of the ASI master and its current consumption shall be tested. The settings of the oscilloscope can be seen on the oscillograms.AS-i masters with integrated AS-i power supply must have an internal voltage supply which is accessible and can be interrupted for this test so that the external AS-i supply can be connected.4.2 Measuring and test equipment· power supply with AS-i data decoupling network· oscilloscope· constant current source (KONST_I)4.3 On-delay4.3.1 GeneralThe offline flag of the master is reset (normal operation). In the initial state the master is not connected with the AS-i line (switch S is open). The master shall communicate with the slaves for min. one second after switch S has been closed. The oscilloscope shall be triggered by the rising edge of the supply voltage on the AS-i line. The start of communication is shown on the oscilloscope via peak detection on and DC coupling.4.3.2 Test circuitFigure 1: Test circuit: On-delayFigure 2: Oscillogram on-delay (example)4.3.3 EvaluationThe time t E is to be determined from the oscillogram. It shall be longer than 1.00s. The accuracy of the measurements shall be within 3%.4.4 Current consumption4.4.1 GeneralIf the master is supplied (see circuit figure 4) with a current corresponding to the total current consumption as stated in the data sheet + 12.5mA (to be set with an accuracy of ± 2.5 mA), the master shall have reached an operating voltage of 26.5V within one second after closing switch S in figure 4. The final operating voltage value to be reached shall be 30V at the output of the circuit with a set constant current.4.4.2 Test circuitFigure 3: Block circuit diagram current consumption measurement of the AS-i master++--Trigger output30V in the stationary state Figure 4: Constant current source with trigger output (KONST_I)Figure 5: Oscillogram current consumption (example)4.4.3 EvaluationThe time t shall be determined from the oscillogram to figure 5. It shall be smaller than 1s. The accuracy of the measurement shall be within 3%.Test recordingsDate:by:TestedTest laboratory:Test report no.:ofPage:Power-On behaviourTest piece code: __________________Network configurationMaster: _________________________Power supply: ______________________ Data decoupling: _____________________Test circuit: KONST_IMeasured values:On-delay t E: ______ s > 1s: yes / noCurrent consumption t : __________ s < 1s: yes / noThe oscillograms are to be added to the appendix.Result:Test passed: Yes / No Signature: _________________5. Test instruction: Burst testReference: Specification AS-i master (Chapters 7 and 8 of the Complete Specification),5.1 GeneralThe test shall be performed with fast transient bursts in form of pulse groups. The interferences are injected on the AS-i line by means of a capacitive coupling clamp. The test shall be made with the following data:·level 3 for data lines·test voltage 1 kV·pulse rate 5 kHz·burst length 15 ms·burst period 300 ms.The following requirements are to be met to minimise the environmental influence on the test results:·ambient temperature: 15° C to 35° C·relative humidity: 45% to 75%·air pressure: 680 hPa to 1060 hPaFigure 1 shows the curve of the transient interferences.Figure 1: Overall curve of the transient interference5.2 Test circuit (principle)Figure 2 shows the test circuit (principle) for the burst test of the AS-i master. Figure 3 shows the circuit diagram of the filter to be used to protect the slaves from burst pulses.K a p . 5.2.2Figure 3: Test installation burst tester (BURST_T)The master operates an AS-i network (see figure 2, consisting of the first 90m of the reference network, see test instruction "Operation on the reference network" from the test requirements for AS-i-slaves and and a burst tester at measurement point 1 of the reference network, see figure 3) in the cyclic normal operation with active data exchange. The burst tester includes 2 AS-i slaves (addresses 1 and 2) and a data strobe evaluation for these two slaves, i.e. all data strobe pulses of slaves 1 and 2 are recorded, the timing is defined for the undisturbed case and the timing violation in the case of bursts is recorded. If the time defined in undisturbed operation is exceeded by more than 100 µs, this indicates an error. In the case of double pulses at slave 1 the time measurement refers to the first pulse.The reference measurements (no faults in the case of burst) require ferrite cores (define number and position) for decoupling (filter).Burst pulses of the burst generator are injected via a capacitive coupling clamp.Measurements are taken over a longer period of time (e.g. 2 min, but for a minimum of 100,000 cycles).5.3 Test installationFigure 4 shows the test installation for the burst test.10 cm above the grounded metal plateFigure 4: Test installation burst test5.4 Measuring and test equipment· burst generator·capacitive coupling clamp·20 m AS-i line (burst setup)· filter·part of the AS-i reference network (90m)·burst tester (BURST_T)·AS-i power supply5.5 Test procedure·The AS-i slaves shall be protected from the effects of burst pulses by means of filters. ·The master shall be grounded according to IEC 801 part 4. The master shall be mounted as described in the data sheet. Supplied mounting material shall be used. Measurements shall be carried out at a distance of 10cm from the metal plate for all designs.·10m AS-i line shall be mounted s-shaped at 10cm above the grounded metal plate; the remaining 10m shall be used to connect the AS-i slaves of the reference network protected by filters and the burst tester.· A test voltage of 1kV shall be set at the burst generator.·The tests shall be made with both burst polarities.·The test period shall be 2 min.5.6 EvaluationThe errors caused by the master to be tested shall be evaluated.To calculate the error rate caused by the system without the master, a test with insensitive reference master (symmetrical design) is performed.5.6.1 Calculation of the maximum error rateBased on the assumption that each AS-i message is disturbed during the burst period of 15 ms each we get a maximum percentage of disturbed messages of (see figure 1):15 ms / 300 ms = 5% = Nmax .5.6.2 Measurement of the actual error rate using a reference masterThe reference master is set up with the lowest possible stray capacitance to mass. It is assumed that no error in the network will occur during operation without burst.5.7 TestThe master shall be installed ready for operation (see data sheet) and – if applicable – connected to mass (ground).Under the influence of the burst pulses the number of exceeded timings of the data strobe pulses between slaves 1 and 2 is measured5.8 EvaluationThe limit value according to specification defines: "Max. every 30th message shall be distorted".This means that:Nmess £ Nmax ·1 30Nmess £16 %has to be met.Test criteria: The number of exceeded timings must not exceed 1 %. 65.9 Enhanced test5.9.1 Test voltage 2kVThe test master shall be installed ready for operation and – if applicable – connected to mass (ground). Refer to the installation notes in the data sheet or the instructions in the box.A test voltage of 2kV shall be set at the burst generator. The test period shall be 2 min.For this test one of the AS-i line shall be grounded at the power supply (protective earth). The functional earth of the power supply shall be removed.5.9.2 EvaluationAt a voltage of 2kV it has to be ensured that no errors occur, in particular:· no RESET,·no destruction of the master during the test.Test recordingsDate: Tested by: Test laboratory: Test report no.: Page: ofBurst test to IEC 801, part 4Test piece code: __________________________ Test piece type: ____________________________ Switching state: ___________________________ Burst generator type: _______________________ Coupling clamp type: ________________________ Mass reference surface: ______________________ Ambient temperature: _______________ Relative humidity: ________________ Air pressure: ________________Network configurationSlaves: __________________Power supply: ___________________ Test level: 3 (1kV)Burst duration: 15ms, burst period 300ms, spike frequency 5kHz Test duration (> 1min): ______________ Test condition: Nmess £ 1/6 % + Nref Test circuit: BURST_TTest results:Test at 1kV:Polarity Nref 1/6 % + Nref Nmess at a distance of 10 cmTest passed:positive yes / no negativeyes / noTest at 2kV:positive polarity negative polarity yes no yes no RESET destructionResult:Test passed: Yes / No Signature: _________________6. Test instruction: Analogue partReference Specification AS-i master (Chapter 7 of the Complete Specification),profiles,Master6.1 GeneralThis test instruction will assess the analogue part of the master.A manufacturer declaration is to guarantee a bit time of the master transmitter of 6µs ±0.1% .6.2 Measuring and test equipment· AS-i master·AS-i power supply· 2 pcs. 4O modules as slaves 1 and 2·AS-i monitor (e.g. SINEC S1 – PC card (CP 2413) with monitor program SCOPE S1, version 1.0), with a capacitive load on the AS-i line of C monitor≤ 0.4 nF·equivalent network (29 slaves, 300 Ohm||(3 nF-C monitor))·data decoupling with HF ground6.3 Test circuit1m (+/-0,1m)99m (+/- 1m)Laboratorypower supply39 OhmFigure 2: Data decoupling and HF groundThe AS-i line (99m) shall be mounted s-shaped (length: 2.50m, distance 0.1m). The data decoupling network shall be made up of a core EF 25 consisting of 2 parts, material N27(Siemens, order nos.: B 66 317-G-X127 and B 66 317-G-X127, see data sheet) with 1mm total air gap, equipped with a bifilar winding of 16.5 windings, wire diameter 0.8mm, wound parallel and the parallel resistor of 39R 1%. The equivalent circuit Zn (copy of an impedance of 29 slaves) is to consist of the parallel wiring of 10 pcs. 3.3kOhm 1% metal film resistors and a capacitance of 3nF 2% (The equivalent circuit Zn includes the impedance of the AS-i monitor, i.e. Zn = 330W || (3nF-C monitor) || monitor).6.4 Test procedureTest 1:1. Set up the test installation as shown in figure 1,2. Set slave 1 on address 21 and slave 2 on address 13. Slave 1 shall be polled by the master with data message ("0xA"), slave 2 with datamessage ("0x0")4. After the error rate has been measured via the monitor, the positions of slaves 1 and2 shall be changed and test shall be repeatedTest 2:1. The test installation shall be changed by removing the 99m AS-i line between slaves 1and 2 and the equivalent network Zn, i.e. slave 2, the AS-i monitor and slave 1 shall be connected at a distance of 1m from the master2. Set slave 1 on address 21 and slave 2 on address 13. Slave 1 shall be polled by the master with data message ("0xA"), slave 2 with datamessage ("0x0")4. The error rate shall be measured via monitor6.5 EvaluationThe monitor shall show an error rate of £ 0.5% for all tests.The error rate shall be defined as the number of master request /slave response combinations for slave 1 not correctly detected by the master, referred to a total number of master requests to slave 1.Test recordingsDate:by:TestedTest laboratory:Test report no.:ofPage:Analogue partTest piece code: ___________________AS-i master: ______________________Power supply: _________________________Test results:Test 1:correct? yes/no Error rate measurement 1: _____% £0.5%correct? yes/no Error rate measurement 2: _____% £0.5%Test 2:correct? yes/no Error rate measurement: _____% £0.5%Result:Test passed: Yes / No Signature: _________________7. Test instruction: Voltage cutoffReference: Specification AS-i master (chapter 7 of the Complete Specification),profiles,Master7.1 GeneralThe reaction of the master to voltage cutoff on the AS-i line of 1ms and a reduced voltage on the AS-i line from approx. 23.5V to 14.5V shall be tested.7.2 Measuring and test equipment· AS-i master·AS-i power supply·AS-i bus monitor· generator· oscilloscope7.3 Test circuitFigure 1 shows the basic principle of the test installation to check the reaction of the master to voltage cutoffs as well as the reduction of the DC voltage on the AS-i line. The connectedslave puts the master in the normal operation mode.7.4 Test procedure:1. Interrupt the voltage on the AS-i line for 0.6 ms with a repetition frequency of < 1Hzand check the AS-i messages by means of the bus monitor.2. Interrupt the voltage on the AS-i line for 2.1ms with a repetition frequency of <1Hz andcheck the AS-i messages by means of the bus monitor.3. Check the transmitting amplitude of the master at an AS-i-DC voltage of 23.5V4. Reduce the DC voltage on the AS-i line from 23.5V to 14.5V.Check AS-i message sequence "RESET_Slave" to all slaves by the master by means of a bus monitor and check their transmitting amplitude and subsequent offline operation of the master.7.5 Evaluation。
A Peer-to-Peer Spatial Cloaking Algorithm for AnonymousLocation-based Services∗Chi-Yin Chow Department of Computer Science and Engineering University of Minnesota Minneapolis,MN cchow@ Mohamed F.MokbelDepartment of ComputerScience and EngineeringUniversity of MinnesotaMinneapolis,MNmokbel@Xuan LiuIBM Thomas J.WatsonResearch CenterHawthorne,NYxuanliu@ABSTRACTThis paper tackles a major privacy threat in current location-based services where users have to report their ex-act locations to the database server in order to obtain their desired services.For example,a mobile user asking about her nearest restaurant has to report her exact location.With untrusted service providers,reporting private location in-formation may lead to several privacy threats.In this pa-per,we present a peer-to-peer(P2P)spatial cloaking algo-rithm in which mobile and stationary users can entertain location-based services without revealing their exact loca-tion information.The main idea is that before requesting any location-based service,the mobile user will form a group from her peers via single-hop communication and/or multi-hop routing.Then,the spatial cloaked area is computed as the region that covers the entire group of peers.Two modes of operations are supported within the proposed P2P spa-tial cloaking algorithm,namely,the on-demand mode and the proactive mode.Experimental results show that the P2P spatial cloaking algorithm operated in the on-demand mode has lower communication cost and better quality of services than the proactive mode,but the on-demand incurs longer response time.Categories and Subject Descriptors:H.2.8[Database Applications]:Spatial databases and GISGeneral Terms:Algorithms and Experimentation. Keywords:Mobile computing,location-based services,lo-cation privacy and spatial cloaking.1.INTRODUCTIONThe emergence of state-of-the-art location-detection de-vices,e.g.,cellular phones,global positioning system(GPS) devices,and radio-frequency identification(RFID)chips re-sults in a location-dependent information access paradigm,∗This work is supported in part by the Grants-in-Aid of Re-search,Artistry,and Scholarship,University of Minnesota. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on thefirst page.To copy otherwise,to republish,to post on servers or to redistribute to lists,requires prior specific permission and/or a fee.ACM-GIS’06,November10-11,2006,Arlington,Virginia,USA. Copyright2006ACM1-59593-529-0/06/0011...$5.00.known as location-based services(LBS)[30].In LBS,mobile users have the ability to issue location-based queries to the location-based database server.Examples of such queries include“where is my nearest gas station”,“what are the restaurants within one mile of my location”,and“what is the traffic condition within ten minutes of my route”.To get the precise answer of these queries,the user has to pro-vide her exact location information to the database server. With untrustworthy servers,adversaries may access sensi-tive information about specific individuals based on their location information and issued queries.For example,an adversary may check a user’s habit and interest by knowing the places she visits and the time of each visit,or someone can track the locations of his ex-friends.In fact,in many cases,GPS devices have been used in stalking personal lo-cations[12,39].To tackle this major privacy concern,three centralized privacy-preserving frameworks are proposed for LBS[13,14,31],in which a trusted third party is used as a middleware to blur user locations into spatial regions to achieve k-anonymity,i.e.,a user is indistinguishable among other k−1users.The centralized privacy-preserving frame-work possesses the following shortcomings:1)The central-ized trusted third party could be the system bottleneck or single point of failure.2)Since the centralized third party has the complete knowledge of the location information and queries of all users,it may pose a serious privacy threat when the third party is attacked by adversaries.In this paper,we propose a peer-to-peer(P2P)spatial cloaking algorithm.Mobile users adopting the P2P spatial cloaking algorithm can protect their privacy without seeking help from any centralized third party.Other than the short-comings of the centralized approach,our work is also moti-vated by the following facts:1)The computation power and storage capacity of most mobile devices have been improv-ing at a fast pace.2)P2P communication technologies,such as IEEE802.11and Bluetooth,have been widely deployed.3)Many new applications based on P2P information shar-ing have rapidly taken shape,e.g.,cooperative information access[9,32]and P2P spatio-temporal query processing[20, 24].Figure1gives an illustrative example of P2P spatial cloak-ing.The mobile user A wants tofind her nearest gas station while beingfive anonymous,i.e.,the user is indistinguish-able amongfive users.Thus,the mobile user A has to look around andfind other four peers to collaborate as a group. In this example,the four peers are B,C,D,and E.Then, the mobile user A cloaks her exact location into a spatialA B CDEBase Stationregion that covers the entire group of mobile users A ,B ,C ,D ,and E .The mobile user A randomly selects one of the mobile users within the group as an agent .In the ex-ample given in Figure 1,the mobile user D is selected as an agent.Then,the mobile user A sends her query (i.e.,what is the nearest gas station)along with her cloaked spa-tial region to the agent.The agent forwards the query to the location-based database server through a base station.Since the location-based database server processes the query based on the cloaked spatial region,it can only give a list of candidate answers that includes the actual answers and some false positives.After the agent receives the candidate answers,it forwards the candidate answers to the mobile user A .Finally,the mobile user A gets the actual answer by filtering out all the false positives.The proposed P2P spatial cloaking algorithm can operate in two modes:on-demand and proactive .In the on-demand mode,mobile clients execute the cloaking algorithm when they need to access information from the location-based database server.On the other side,in the proactive mode,mobile clients periodically look around to find the desired number of peers.Thus,they can cloak their exact locations into spatial regions whenever they want to retrieve informa-tion from the location-based database server.In general,the contributions of this paper can be summarized as follows:1.We introduce a distributed system architecture for pro-viding anonymous location-based services (LBS)for mobile users.2.We propose the first P2P spatial cloaking algorithm for mobile users to entertain high quality location-based services without compromising their privacy.3.We provide experimental evidence that our proposed algorithm is efficient in terms of the response time,is scalable to large numbers of mobile clients,and is effective as it provides high-quality services for mobile clients without the need of exact location information.The rest of this paper is organized as follows.Section 2highlights the related work.The system model of the P2P spatial cloaking algorithm is presented in Section 3.The P2P spatial cloaking algorithm is described in Section 4.Section 5discusses the integration of the P2P spatial cloak-ing algorithm with privacy-aware location-based database servers.Section 6depicts the experimental evaluation of the P2P spatial cloaking algorithm.Finally,Section 7con-cludes this paper.2.RELATED WORKThe k -anonymity model [37,38]has been widely used in maintaining privacy in databases [5,26,27,28].The main idea is to have each tuple in the table as k -anonymous,i.e.,indistinguishable among other k −1tuples.Although we aim for the similar k -anonymity model for the P2P spatial cloaking algorithm,none of these techniques can be applied to protect user privacy for LBS,mainly for the following four reasons:1)These techniques preserve the privacy of the stored data.In our model,we aim not to store the data at all.Instead,we store perturbed versions of the data.Thus,data privacy is managed before storing the data.2)These approaches protect the data not the queries.In anonymous LBS,we aim to protect the user who issues the query to the location-based database server.For example,a mobile user who wants to ask about her nearest gas station needs to pro-tect her location while the location information of the gas station is not protected.3)These approaches guarantee the k -anonymity for a snapshot of the database.In LBS,the user location is continuously changing.Such dynamic be-havior calls for continuous maintenance of the k -anonymity model.(4)These approaches assume a unified k -anonymity requirement for all the stored records.In our P2P spatial cloaking algorithm,k -anonymity is a user-specified privacy requirement which may have a different value for each user.Motivated by the privacy threats of location-detection de-vices [1,4,6,40],several research efforts are dedicated to protect the locations of mobile users (e.g.,false dummies [23],landmark objects [18],and location perturbation [10,13,14]).The most closed approaches to ours are two centralized spatial cloaking algorithms,namely,the spatio-temporal cloaking [14]and the CliqueCloak algorithm [13],and one decentralized privacy-preserving algorithm [23].The spatio-temporal cloaking algorithm [14]assumes that all users have the same k -anonymity requirements.Furthermore,it lacks the scalability because it deals with each single request of each user individually.The CliqueCloak algorithm [13]as-sumes a different k -anonymity requirement for each user.However,since it has large computation overhead,it is lim-ited to a small k -anonymity requirement,i.e.,k is from 5to 10.A decentralized privacy-preserving algorithm is proposed for LBS [23].The main idea is that the mobile client sends a set of false locations,called dummies ,along with its true location to the location-based database server.However,the disadvantages of using dummies are threefold.First,the user has to generate realistic dummies to pre-vent the adversary from guessing its true location.Second,the location-based database server wastes a lot of resources to process the dummies.Finally,the adversary may esti-mate the user location by using cellular positioning tech-niques [34],e.g.,the time-of-arrival (TOA),the time differ-ence of arrival (TDOA)and the direction of arrival (DOA).Although several existing distributed group formation al-gorithms can be used to find peers in a mobile environment,they are not designed for privacy preserving in LBS.Some algorithms are limited to only finding the neighboring peers,e.g.,lowest-ID [11],largest-connectivity (degree)[33]and mobility-based clustering algorithms [2,25].When a mo-bile user with a strict privacy requirement,i.e.,the value of k −1is larger than the number of neighboring peers,it has to enlist other peers for help via multi-hop routing.Other algorithms do not have this limitation,but they are designed for grouping stable mobile clients together to facil-Location-based Database ServerDatabase ServerDatabase ServerFigure 2:The system architectureitate efficient data replica allocation,e.g.,dynamic connec-tivity based group algorithm [16]and mobility-based clus-tering algorithm,called DRAM [19].Our work is different from these approaches in that we propose a P2P spatial cloaking algorithm that is dedicated for mobile users to dis-cover other k −1peers via single-hop communication and/or via multi-hop routing,in order to preserve user privacy in LBS.3.SYSTEM MODELFigure 2depicts the system architecture for the pro-posed P2P spatial cloaking algorithm which contains two main components:mobile clients and location-based data-base server .Each mobile client has its own privacy profile that specifies its desired level of privacy.A privacy profile includes two parameters,k and A min ,k indicates that the user wants to be k -anonymous,i.e.,indistinguishable among k users,while A min specifies the minimum resolution of the cloaked spatial region.The larger the value of k and A min ,the more strict privacy requirements a user needs.Mobile users have the ability to change their privacy profile at any time.Our employed privacy profile matches the privacy re-quirements of mobiles users as depicted by several social science studies (e.g.,see [4,15,17,22,29]).In this architecture,each mobile user is equipped with two wireless network interface cards;one of them is dedicated to communicate with the location-based database server through the base station,while the other one is devoted to the communication with other peers.A similar multi-interface technique has been used to implement IP multi-homing for stream control transmission protocol (SCTP),in which a machine is installed with multiple network in-terface cards,and each assigned a different IP address [36].Similarly,in mobile P2P cooperation environment,mobile users have a network connection to access information from the server,e.g.,through a wireless modem or a base station,and the mobile users also have the ability to communicate with other peers via a wireless LAN,e.g.,IEEE 802.11or Bluetooth [9,24,32].Furthermore,each mobile client is equipped with a positioning device, e.g.,GPS or sensor-based local positioning systems,to determine its current lo-cation information.4.P2P SPATIAL CLOAKINGIn this section,we present the data structure and the P2P spatial cloaking algorithm.Then,we describe two operation modes of the algorithm:on-demand and proactive .4.1Data StructureThe entire system area is divided into grid.The mobile client communicates with each other to discover other k −1peers,in order to achieve the k -anonymity requirement.TheAlgorithm 1P2P Spatial Cloaking:Request Originator m 1:Function P2PCloaking-Originator (h ,k )2://Phase 1:Peer searching phase 3:The hop distance h is set to h4:The set of discovered peers T is set to {∅},and the number ofdiscovered peers k =|T |=05:while k <k −1do6:Broadcast a FORM GROUP request with the parameter h (Al-gorithm 2gives the response of each peer p that receives this request)7:T is the set of peers that respond back to m by executingAlgorithm 28:k =|T |;9:if k <k −1then 10:if T =T then 11:Suspend the request 12:end if 13:h ←h +1;14:T ←T ;15:end if 16:end while17://Phase 2:Location adjustment phase 18:for all T i ∈T do19:|mT i .p |←the greatest possible distance between m and T i .pby considering the timestamp of T i .p ’s reply and maximum speed20:end for21://Phase 3:Spatial cloaking phase22:Form a group with k −1peers having the smallest |mp |23:h ←the largest hop distance h p of the selected k −1peers 24:Determine a grid area A that covers the entire group 25:if A <A min then26:Extend the area of A till it covers A min 27:end if28:Randomly select a mobile client of the group as an agent 29:Forward the query and A to the agentmobile client can thus blur its exact location into a cloaked spatial region that is the minimum grid area covering the k −1peers and itself,and satisfies A min as well.The grid area is represented by the ID of the left-bottom and right-top cells,i.e.,(l,b )and (r,t ).In addition,each mobile client maintains a parameter h that is the required hop distance of the last peer searching.The initial value of h is equal to one.4.2AlgorithmFigure 3gives a running example for the P2P spatial cloaking algorithm.There are 15mobile clients,m 1to m 15,represented as solid circles.m 8is the request originator,other black circles represent the mobile clients received the request from m 8.The dotted circles represent the commu-nication range of the mobile client,and the arrow represents the movement direction.Algorithms 1and 2give the pseudo code for the request originator (denoted as m )and the re-quest receivers (denoted as p ),respectively.In general,the algorithm consists of the following three phases:Phase 1:Peer searching phase .The request origina-tor m wants to retrieve information from the location-based database server.m first sets h to h ,a set of discovered peers T to {∅}and the number of discovered peers k to zero,i.e.,|T |.(Lines 3to 4in Algorithm 1).Then,m broadcasts a FORM GROUP request along with a message sequence ID and the hop distance h to its neighboring peers (Line 6in Algorithm 1).m listens to the network and waits for the reply from its neighboring peers.Algorithm 2describes how a peer p responds to the FORM GROUP request along with a hop distance h and aFigure3:P2P spatial cloaking algorithm.Algorithm2P2P Spatial Cloaking:Request Receiver p1:Function P2PCloaking-Receiver(h)2://Let r be the request forwarder3:if the request is duplicate then4:Reply r with an ACK message5:return;6:end if7:h p←1;8:if h=1then9:Send the tuple T=<p,(x p,y p),v maxp ,t p,h p>to r10:else11:h←h−1;12:Broadcast a FORM GROUP request with the parameter h 13:T p is the set of peers that respond back to p14:for all T i∈T p do15:T i.h p←T i.h p+1;16:end for17:T p←T p∪{<p,(x p,y p),v maxp ,t p,h p>};18:Send T p back to r19:end ifmessage sequence ID from another peer(denoted as r)that is either the request originator or the forwarder of the re-quest.First,p checks if it is a duplicate request based on the message sequence ID.If it is a duplicate request,it sim-ply replies r with an ACK message without processing the request.Otherwise,p processes the request based on the value of h:Case1:h= 1.p turns in a tuple that contains its ID,current location,maximum movement speed,a timestamp and a hop distance(it is set to one),i.e.,< p,(x p,y p),v max p,t p,h p>,to r(Line9in Algorithm2). Case2:h> 1.p decrements h and broadcasts the FORM GROUP request with the updated h and the origi-nal message sequence ID to its neighboring peers.p keeps listening to the network,until it collects the replies from all its neighboring peers.After that,p increments the h p of each collected tuple,and then it appends its own tuple to the collected tuples T p.Finally,it sends T p back to r (Lines11to18in Algorithm2).After m collects the tuples T from its neighboring peers, if m cannotfind other k−1peers with a hop distance of h,it increments h and re-broadcasts the FORM GROUP request along with a new message sequence ID and h.m repeatedly increments h till itfinds other k−1peers(Lines6to14in Algorithm1).However,if mfinds the same set of peers in two consecutive broadcasts,i.e.,with hop distances h and h+1,there are not enough connected peers for m.Thus, m has to relax its privacy profile,i.e.,use a smaller value of k,or to be suspended for a period of time(Line11in Algorithm1).Figures3(a)and3(b)depict single-hop and multi-hop peer searching in our running example,respectively.In Fig-ure3(a),the request originator,m8,(e.g.,k=5)canfind k−1peers via single-hop communication,so m8sets h=1. Since h=1,its neighboring peers,m5,m6,m7,m9,m10, and m11,will not further broadcast the FORM GROUP re-quest.On the other hand,in Figure3(b),m8does not connect to k−1peers directly,so it has to set h>1.Thus, its neighboring peers,m7,m10,and m11,will broadcast the FORM GROUP request along with a decremented hop dis-tance,i.e.,h=h−1,and the original message sequence ID to their neighboring peers.Phase2:Location adjustment phase.Since the peer keeps moving,we have to capture the movement between the time when the peer sends its tuple and the current time. For each received tuple from a peer p,the request originator, m,determines the greatest possible distance between them by an equation,|mp |=|mp|+(t c−t p)×v max p,where |mp|is the Euclidean distance between m and p at time t p,i.e.,|mp|=(x m−x p)2+(y m−y p)2,t c is the currenttime,t p is the timestamp of the tuple and v maxpis the maximum speed of p(Lines18to20in Algorithm1).In this paper,a conservative approach is used to determine the distance,because we assume that the peer will move with the maximum speed in any direction.If p gives its movement direction,m has the ability to determine a more precise distance between them.Figure3(c)illustrates that,for each discovered peer,the circle represents the largest region where the peer can lo-cate at time t c.The greatest possible distance between the request originator m8and its discovered peer,m5,m6,m7, m9,m10,or m11is represented by a dotted line.For exam-ple,the distance of the line m8m 11is the greatest possible distance between m8and m11at time t c,i.e.,|m8m 11|. Phase3:Spatial cloaking phase.In this phase,the request originator,m,forms a virtual group with the k−1 nearest peers,based on the greatest possible distance be-tween them(Line22in Algorithm1).To adapt to the dynamic network topology and k-anonymity requirement, m sets h to the largest value of h p of the selected k−1 peers(Line15in Algorithm1).Then,m determines the minimum grid area A covering the entire group(Line24in Algorithm1).If the area of A is less than A min,m extends A,until it satisfies A min(Lines25to27in Algorithm1). Figure3(c)gives the k−1nearest peers,m6,m7,m10,and m11to the request originator,m8.For example,the privacy profile of m8is(k=5,A min=20cells),and the required cloaked spatial region of m8is represented by a bold rectan-gle,as depicted in Figure3(d).To issue the query to the location-based database server anonymously,m randomly selects a mobile client in the group as an agent(Line28in Algorithm1).Then,m sendsthe query along with the cloaked spatial region,i.e.,A,to the agent(Line29in Algorithm1).The agent forwards thequery to the location-based database server.After the serverprocesses the query with respect to the cloaked spatial re-gion,it sends a list of candidate answers back to the agent.The agent forwards the candidate answer to m,and then mfilters out the false positives from the candidate answers. 4.3Modes of OperationsThe P2P spatial cloaking algorithm can operate in twomodes,on-demand and proactive.The on-demand mode:The mobile client only executesthe algorithm when it needs to retrieve information from the location-based database server.The algorithm operatedin the on-demand mode generally incurs less communica-tion overhead than the proactive mode,because the mobileclient only executes the algorithm when necessary.However,it suffers from a longer response time than the algorithm op-erated in the proactive mode.The proactive mode:The mobile client adopting theproactive mode periodically executes the algorithm in back-ground.The mobile client can cloak its location into a spa-tial region immediately,once it wants to communicate withthe location-based database server.The proactive mode pro-vides a better response time than the on-demand mode,but it generally incurs higher communication overhead and giveslower quality of service than the on-demand mode.5.ANONYMOUS LOCATION-BASEDSERVICESHaving the spatial cloaked region as an output form Algo-rithm1,the mobile user m sends her request to the location-based server through an agent p that is randomly selected.Existing location-based database servers can support onlyexact point locations rather than cloaked regions.In or-der to be able to work with a spatial region,location-basedservers need to be equipped with a privacy-aware queryprocessor(e.g.,see[29,31]).The main idea of the privacy-aware query processor is to return a list of candidate answerrather than the exact query answer.Then,the mobile user m willfilter the candidate list to eliminate its false positives andfind its exact answer.The tighter the spatial cloaked re-gion,the lower is the size of the candidate answer,and hencethe better is the performance of the privacy-aware query processor.However,tight cloaked regions may represent re-laxed privacy constrained.Thus,a trade-offbetween the user privacy and the quality of service can be achieved[31]. Figure4(a)depicts such scenario by showing the data stored at the server side.There are32target objects,i.e., gas stations,T1to T32represented as black circles,the shaded area represents the spatial cloaked area of the mo-bile client who issued the query.For clarification,the actual mobile client location is plotted in Figure4(a)as a black square inside the cloaked area.However,such information is neither stored at the server side nor revealed to the server. The privacy-aware query processor determines a range that includes all target objects that are possibly contributing to the answer given that the actual location of the mobile client could be anywhere within the shaded area.The range is rep-resented as a bold rectangle,as depicted in Figure4(b).The server sends a list of candidate answers,i.e.,T8,T12,T13, T16,T17,T21,and T22,back to the agent.The agent next for-(a)Server Side(b)Client SideFigure4:Anonymous location-based services wards the candidate answers to the requesting mobile client either through single-hop communication or through multi-hop routing.Finally,the mobile client can get the actualanswer,i.e.,T13,byfiltering out the false positives from thecandidate answers.The algorithmic details of the privacy-aware query proces-sor is beyond the scope of this paper.Interested readers are referred to[31]for more details.6.EXPERIMENTAL RESULTSIn this section,we evaluate and compare the scalabilityand efficiency of the P2P spatial cloaking algorithm in boththe on-demand and proactive modes with respect to the av-erage response time per query,the average number of mes-sages per query,and the size of the returned candidate an-swers from the location-based database server.The queryresponse time in the on-demand mode is defined as the timeelapsed between a mobile client starting to search k−1peersand receiving the candidate answers from the agent.On theother hand,the query response time in the proactive mode is defined as the time elapsed between a mobile client startingto forward its query along with the cloaked spatial regionto the agent and receiving the candidate answers from theagent.The simulation model is implemented in C++usingCSIM[35].In all the experiments in this section,we consider an in-dividual random walk model that is based on“random way-point”model[7,8].At the beginning,the mobile clientsare randomly distributed in a spatial space of1,000×1,000square meters,in which a uniform grid structure of100×100cells is constructed.Each mobile client randomly chooses itsown destination in the space with a randomly determined speed s from a uniform distribution U(v min,v max).When the mobile client reaches the destination,it comes to a stand-still for one second to determine its next destination.Afterthat,the mobile client moves towards its new destinationwith another speed.All the mobile clients repeat this move-ment behavior during the simulation.The time interval be-tween two consecutive queries generated by a mobile client follows an exponential distribution with a mean of ten sec-onds.All the experiments consider one half-duplex wirelesschannel for a mobile client to communicate with its peers with a total bandwidth of2Mbps and a transmission range of250meters.When a mobile client wants to communicate with other peers or the location-based database server,it has to wait if the requested channel is busy.In the simulated mobile environment,there is a centralized location-based database server,and one wireless communication channel between the location-based database server and the mobile。