Programming HeuristicLab Basics A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus.

Slides:



Advertisements
Similar presentations
TP4: S TATE M ACHINE D ESIGN P ATTERN  Definition  Infrastructure  Transition Code  Conclusion.
Advertisements

Polycom Quotes on Demand Tool Partner User Guide Version 1.1
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Programming HeuristicLab A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus Hagenberg.
Chapter 12 Creating and Using Templates. If you have already created and designed a page you like, you can use the layout and design for other pages in.
Feature requests for Case Manager By Spar Nord Bank A/S IBM Insight 2014 Spar Nord Bank A/S1.
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
ASP.NET Programming with C# and SQL Server First Edition
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 7: Advanced File System Management.
Using Ant to build J2EE Applications Kumar
CST JavaScript Validating Form Data with JavaScript.
Guide to Using Message Maker Robert Snelick National Institute of Standards & Technology (NIST) December 2005
Digital Image Processing Lecture3: Introduction to MATLAB.
1 CSC 221: Computer Programming I Fall 2004 course overview  what did we set out to learn?  what did you actually learn?  where do you go from here?
A First Program Using C#
11 Games and Content Session 4.1. Session Overview  Show how games are made up of program code and content  Find out about the content management system.
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Working Out with KURL! Shayne Koestler Kinetic Data.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Chapter 8: Writing Graphical User Interfaces
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Ray Konopka Developing Custom.NET Component Designers DevCon Course No: 4106.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Dreamweaver MX. 2 Overview of Templates n Templates represent a web page design or _______ that will be common to multiple pages. n There are two situations.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
© 2006 IBM Corporation Agile Planning Web UI. © 2006 IBM Corporation Agenda  Overview of APT Web UI  Current Issues  Required Infrastructure  API.
Programming HeuristicLab Basics A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus.
Frameworks CompSci 230 S Software Construction.
Enterprise Library Extensibility Brian Button VP of Engineering Asynchrony Solutions, Inc.
TOS / TIS Code Architecture Copyright © 2008 Talend. All rights reserved.
Cross Language Clone Analysis Team 2 October 13, 2010.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Developing Great Dashlets Will Abson About Me Project Lead, Share Extras Alfresco Developer and previously Solutions Engineer DevCon 2011 –
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Object Oriented Software Development 4. C# data types, objects and references.
Welcome! Welcome! Agenda - Wednesday  Introduction  Installation Tips  New Client Features  New Application Design Features  Installing Chart Director.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Cross Language Clone Analysis Team 2 February 3, 2011.
HeuristicLab 3.0 Overview. Motivation genericity – no focus on any particular heuristic optimization paradigm – suitable for any kind of algorithm – suitable.
Programming HeuristicLab Basics A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Programming HeuristicLab A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus Hagenberg.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 “Hello World” web part Typical deployment.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
© 2010 Delmar, Cengage Learning Chapter 11 Creating and Using Templates.
Apache Struts Technology A MVC Framework for Java Web Applications.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Generating ADL Descriptions ADL Module for Together 6.x Massimo Marino Lawrence Berkeley National Laboratory.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
ICS 3UI - Introduction to Computer Science
University Of Karachi Department Of Computer Science
CARA 3.10 Major New Features
CSC 221: Computer Programming I Fall 2005
Java Beans Sagun Dhakhwa.
Chapter 2: System Structures
CIS16 Application Development – Programming with Visual Basic
Kunal Shroff EPICS Spring Collaboration Meeting, October 2010 BNL
Database Applications
Presentation transcript:

Programming HeuristicLab Basics A. Scheibenpflug Heuristic and Evolutionary Algorithms Laboratory (HEAL) School of Informatics/Communications/Media, Campus Hagenberg University of Applied Sciences Upper Austria

Prerequisites You should – know how to use HeuristicLab – have a basic understanding of what metaheuristics are – know how to write code – know C# or Java or similar languages This is not a user guide This is an overview – For details have a look at the source code Programming HeuristicLabhttp://dev.heuristiclab.com2

Introduction HeuristicLab (HL) is quite a big project As of : – 5 VS solutions containing 173 projects – Lines of code: (EXT) = LOC – 368 unit tests – Quite a lot of feature branches in the SVN repository There are certain patterns/concepts that are used throughout all that code Programming HeuristicLabhttp://dev.heuristiclab.com3

Extension Points HL can be extended in multiple ways – User-defined algorithm – User-defined problem – Programmable operators – Programmable problem – C# Script – Plugins Programming HeuristicLabhttp://dev.heuristiclab.com4

User-defined algorithm Programming HeuristicLabhttp://dev.heuristiclab.com5 Start from an existing algorithm No programming skills required Useful for smaller modifications and prototyping Caution: Wiring is not active

User-defined problem Define a problem in the UI Use user-defined operators to fill the problems operator collection Usage of programmable operators also possible (e.g. programmable analyzer) No programming skills required Programming HeuristicLabhttp://dev.heuristiclab.com6

Programmable operators Used in user-defined algorithms and problems Used if there is – no appropriate operator available – creating a CombinedOperator is not desired Programming skills required Programming HeuristicLabhttp://dev.heuristiclab.com7

Programmable problem Allows to define a problem in code in HeuristicLab Similar to user-defined problem, but with C# Only works if the encoding already exists Multi-encodings are possible Prototyping Programming HeuristicLabhttp://dev.heuristiclab.com8

C# Script Write programs from within HeuristicLab Access to – HeuristicLab APIs – data types – views Mainly used for – creating complex experiments – analysis – pre- and post processing Prototyping Programming HeuristicLabhttp://dev.heuristiclab.com9

Plugins Are loaded into HL on startup Allow to add – algorithms – problems – operators Some features can only be added by creating plugins – data types – items – encodings – views – … Most universal way of adding functionality to HL Programming HeuristicLabhttp://dev.heuristiclab.com10

Overview Plugins HL Object Model Deep Cloning Persistence Items HL Data Types HL Collections Content and Views ViewHost Programming HeuristicLabhttp://dev.heuristiclab.com11

Where are we? Programming HeuristicLabhttp://dev.heuristiclab.com12

Plugins Every plugin needs to contain a class that inherits PluginBase If an assembly contains such a class, it is a plugin and loaded by HeuristicLab Programming HeuristicLabhttp://dev.heuristiclab.com13

Plugins PluginDependency must reflect references Plugin Infrastructure does not have to be included as it is always needed We normally use SubWCRev for version information Programming HeuristicLabhttp://dev.heuristiclab.com14

Some additional remarks Plugins are signed with the HeuristicLab key Every plugin builds to sources\bin (output path of project should be “..\..\bin\“ for all configurations adhering to standard HL folder structure) Default namespace and assembly name should/must match plugin description There should be x86, x64, Any CPU Debug and Release configurations “Copy Local“ should be false for all Project/File references Programming HeuristicLabhttp://dev.heuristiclab.com15

HL Object Model Programming HeuristicLabhttp://dev.heuristiclab.com16

Deep Cloning Objects in HeuristicLab that store data and may be displayed in views/collection views should be deep cloneable UI allows “copying” of these objects Inherit from either IDeepCloneable or Item Implement interface and cloning constructor Actual cloning happens in the cloning constructor Programming HeuristicLabhttp://dev.heuristiclab.com17

Deep Cloning Programming HeuristicLabhttp://dev.heuristiclab.com18 Item implements IDeepCloneable Call cloning constructor which implements the cloning

Persistence HL provides it‘s own serialization mechanism A class that should be serializable has to be marked with the StorableClass[] attribute Properties that should be serialized have to be marked with the Storable[] attribute Storable constructor has to be implemented Optional: Define hooks with attribute StorableHook[] to react on loading/saving events Implement IStorableContent to signal that this is a root object Programming HeuristicLabhttp://dev.heuristiclab.com19

Persistence Programming HeuristicLabhttp://dev.heuristiclab.com20 Properties that should be stored in a file have to be marked with Storable[] Mandatory storable constructor. Used by the persistence when deserializing.

Items Items have – a name – a description – an icon – ToStringChanged and ItemImageChanged events All Items are DeepCloneables and Storable Items are marked as IContent to allow displaying in views Use Item[] attribute to set name and description Programming HeuristicLabhttp://dev.heuristiclab.com21

Items Programming HeuristicLabhttp://dev.heuristiclab.com22

HL Data Types Located in HeuristicLab.Data (and corresponding views in Data.Views ) Wrap standard.NET data types and provide functionality necessary for UIs: – ValueChanged event – Parsing of strings – Validation Data types include – IntValue, DoubleValue, PercentValue, StringValue,… – Ranges, Arrays, Matrices Programming HeuristicLabhttp://dev.heuristiclab.com23

Collections Located in HeuristicLab.Collections/Core (and Core.Views for the corresponding views) Same as with data types, provide UI friendly wrappers for.NET collections (e.g., additional events) There are Lists, Arrays, Sets, Dictionaries and read-only collections Most are designed for Items Programming HeuristicLabhttp://dev.heuristiclab.com24

Data Types and Collections Programming HeuristicLabhttp://dev.heuristiclab.com25 results.Add(new Result("MWIPS", new IntValue(intRating / 1000))); DoubleValue doubleValue = new DoubleValue(); doubleValue.Value = resultValue.Value.Average(); [Storable] private ItemList terms; public CovarianceSum() : base() { this.terms = new ItemList (); } terms.Select(t => t.GetNumberOfParameters(numberOfVariables)).Sum();

Content and Views HL provides views for all data types, collections and much more (including input validation and updates) Views display (and manipulate) Content Use Content[] attribute to define the type of Content a View can display Inherit UserControl from AsynchronousContentView or ItemView Content is set by HeuristicLab or manually React on events (e.g., OnContentChanged, (De)RegisterContentEvents, …) Programming HeuristicLabhttp://dev.heuristiclab.com26

Content and Views Programming HeuristicLabhttp://dev.heuristiclab.com27 Defines what Content can be displayed with this view

Displaying Content Manually: – Log log = new Log(); – LogView logview = new LogView(); – logview.Content = log; In an own tab using discovery: – MainFormManager.MainForm.ShowContent(log); Using a ViewHost Programming HeuristicLabhttp://dev.heuristiclab.com28 Log log = new Log(); LogView logview = new LogView(); logview.Content = log; MainFormManager.MainForm.ShowContent(log);

ViewHost ViewHost is a special ContentView that changes it‘s appearance based on the type of Content Content[] attribute marks a view for a certain content type ViewHost looks up the view based on the Content type and uses it to display the Content Useful for views that can contain different Content types or collection views Programming HeuristicLabhttp://dev.heuristiclab.com29

Useful Links Programming HeuristicLabhttp://dev.heuristiclab.com