From Optflux
Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 31: Line 31:
 
* The following command will checkout the latest snapshot from the Subversion server
 
* The following command will checkout the latest snapshot from the Subversion server
 
  svn co https://optflux.svn.sourceforge.net/svnroot/optflux optflux
 
  svn co https://optflux.svn.sourceforge.net/svnroot/optflux optflux
 +
 +
= OptFlux Architecture =
 +
 +
Version 2.3 (first fully open version of OptFlux) is composed of six main plug-ins all of which are distributed by default in the downloadable archives of OptFlux. Some extra plug-ins are also distributed in the main version although they are not part of what we call "the core".
 +
 +
This six plug-ins are the following:
 +
 +
* '''optflux.core''' - the core datatypes, viewers and operations to load/export and interact with models in several formats
 +
* '''optflux.simulation''' - simulation related datatypes, operations and views. Wild-type, Gene and Reaction KO. (FBA, MOMA, ROOM, FVA, etc...)
 +
* '''optflux.optimization''' - optimization specific datatypes, operations and views (Gene and Reaction KO optimization)
 +
* '''optflux.biovisualizer''' - our own visualizer for biochemical networks. Support for CellDesigner layouts
 +
* '''optflux.saveloadquit''' - just a save / load / quit project dedicated plug-in. Datatype agnostic as long as data is serializable.
 +
* '''optflux.extraviewers''' - some extra viewers that we decided to include in the core release.
  
 
= AIBench Introduction =
 
= AIBench Introduction =
Line 40: Line 53:
 
*The programmer is forced to "think-before-programming", easing the code reuse.   
 
*The programmer is forced to "think-before-programming", easing the code reuse.   
  
==Philosophy==
+
==Philosophy:==
  
 
The AIBench platform was conceived to facilitate the development of a wide range of applications based on generic input-process-output cycles where the framework acts as the glue between each task. The framework manages three key concepts that are constant in every AIBench application: operations, data-types and views that realize the MVC design pattern. The developer only needs to focus on how to separate and structure the problem specific code into objects of these three entities. The framework will carry out the rest of the work to generate a completely executable final application, including:
 
The AIBench platform was conceived to facilitate the development of a wide range of applications based on generic input-process-output cycles where the framework acts as the glue between each task. The framework manages three key concepts that are constant in every AIBench application: operations, data-types and views that realize the MVC design pattern. The developer only needs to focus on how to separate and structure the problem specific code into objects of these three entities. The framework will carry out the rest of the work to generate a completely executable final application, including:
Line 52: Line 65:
 
Programming over AIBench is a lightweight task, since it makes use of Java Annotations, thus easily enforcing the MVC model upon the programmers.
 
Programming over AIBench is a lightweight task, since it makes use of Java Annotations, thus easily enforcing the MVC model upon the programmers.
  
==Operation Model==
+
==Operation Model:==
  
 
An AIBench operation is a simple Java class with some annotations that define its INPUT/OUTPUT. For example:  
 
An AIBench operation is a simple Java class with some annotations that define its INPUT/OUTPUT. For example:  
Line 88: Line 101:
 
he figure shows a snapshot of the OptFlux Workbench. On the left side, you can see the '''Clipboard''' tree where the operations and results are shown. On the right side, you can see the '''views''' for the results. These are displayed when a result with a valid view is clicked in the Clipboard. In the bottom-right zone there is a memory monitor, a Logging monitor and a Plug-in Manager.
 
he figure shows a snapshot of the OptFlux Workbench. On the left side, you can see the '''Clipboard''' tree where the operations and results are shown. On the right side, you can see the '''views''' for the results. These are displayed when a result with a valid view is clicked in the Clipboard. In the bottom-right zone there is a memory monitor, a Logging monitor and a Plug-in Manager.
  
=== Dynamic generation of input dialogs ===
+
==Plug-in Architecture:==
 
 
Currently the dynamic generation of dialogs, maps Data-types with controls following the policy of the following table.
 
 
 
<table border="1" cellspacing="0" cellpadding="4" width="100%" bordercolor="#000000"> <tr valign="top"> <td width="50%" bgcolor="#000000"> <p class="western"><strong style="color: #ffffff">Data type</strong></p> </td> <td width="50%" bgcolor="#000000"> <p class="western" align="justify"><strong style="color: #ffffff">Control used</strong></p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western"><font size="2">Primitive Type (int, float, double, char)</font></p> </td> <td width="50%"> <p class="western" align="justify">Text field</p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western"><font size="2">Boolean</font></p> </td> <td width="50%"> <p class="western" align="justify">Check-box</p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western">Enum type (Java 1.5)</p> </td> <td width="50%"> <p class="western" align="justify">ComboBox with each option</p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western">A class with a constructor with one parameter of type String (primitive wrapper, String...)</p> </td> <td width="50%"> <p class="western" align="justify">Text field</p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western"><font size="2">java.io.File</font></p> </td> <td width="50%"> <p class="western" align="justify">Text field with a “Find...” button that brings a file chooser dialog</p> </td> </tr> <tr valign="top"> <td width="50%"> <p class="western">Other class (can only take the value from the CLIPBOARD)</p> </td> <td width="50%"> <p class="western" align="justify">Combo box with the instances of the same class available in the clipboard</p> </td> </tr> <tr valign="top"> <td width="50%"> <p style="margin-bottom: 0cm" class="western">Array</p> <p class="western"><br> </p> </td> <td width="50%"> <p class="western" align="justify">The control inferred with the above criteria, plus a list and an “add” button to put elements in the array</p> </td> </tr> </table>
 
 
 
The generation of dialogs is very powerful and can generate complex dialogs like this one:
 
 
 
[[Image:workbench2.png]]
 
 
 
== Plug-in Architecture (and the importance of the plugin.xml file) ==
 
  
 
The AIBench framework is powered by a versatile plug-in engine. This plug-in engine is ready to accept modification at several levels:
 
The AIBench framework is powered by a versatile plug-in engine. This plug-in engine is ready to accept modification at several levels:
 
  
 
  
*SERVICES PROGRAMMER - out of scope
+
*SERVICES PROGRAMMER
 
*CORE PROGRAMMER
 
*CORE PROGRAMMER
 
**CORE: Manages the operations, invoking them and keeping track of their results and invocation history. 
 
**CORE: Manages the operations, invoking them and keeping track of their results and invocation history. 
Line 111: Line 114:
 
[[Image:aibench_plug.png]]
 
[[Image:aibench_plug.png]]
  
In summary, the Operations programmer builds this type of artefacts:
+
== Operations in OptFlux ==
  
* '''Operations'''. The units of logic.
 
* '''Datatypes'''. Normal Java classes used as input and output of the Operations.
 
* '''Views'''. Classes that inherits from JComponent and are used to display the Data-types inside the Workbench.
 
  
This is in fact an abstraction of the '''Model-View-Controller (MVC)''' Design Standard:
+
== The Datatypes of OptFlux ==
  
[[Image:workbench3.png]]
 
  
AIBench/OptFlux uses a plugin engine behind the scenes to provide advanced capabilities such as dynamic discover and load of new Operations by only restarting the application. You need to know the basics of this engine in order to develop Operations/Plug-ins for OptFlux.
+
== Views in OptFlux ==
 
 
# A plugin engine is used to create applications based in software modules, called plugins. This paradigm follows these rules:
 
#* A plugin is a set of classes, isolated (by default) from the rest of the classes belonging to other plugins.
 
#* A plugin can define extension points (the yellow circles in Figure 5). An extension point is a place where other plugins can be connected to and then discovered and used at run-time. Optionally, an extension point could establish a Java interface that must be implemented by the plugins connected to it.
 
#* A plugin can use the classes from other plugin only if a dependency from the first to the second has been defined.
 
#* AIBench contains two basic plugins: the '''CORE''' and the '''WORKBENCH''', communicated internally by an extension point (the top one in the last figure), but this is out of the scope of this document.
 
# Also the CORE implements the extensible AIBench Operation Model by the definition of an extension point called '''aibench.core.operation-definition'''.
 
#*'''To add Operations to AIBench/OptFlux''', you have to put them in a plugin and connect it to this extension point. There is not any required interface to implement.
 
# The WORKBENCH implements the Workbench user interface and also defines an extension point called '''aibench.workbench.view'''. To register a view component associated with a Datatype, you have to put your component in a plugin and connect it to this extension point. There is not any required interface to implement.
 
#*The user Datatypes have to be placed inside a plugin, but this plugin doesn't need to be connected to any extension point. (Please note that if some of your Operations use these Datatypes and reside in other plugins, they must depend on this plugin).
 
# You can put your Operations, Views and Datatypes in one, two or more separated plug-ins, based on your own design decision. The only rules that have to be followed are:
 
#* If there are Operations and/or Views in a plugin, this plugin must be connected to the properly extension points as it was explained before.
 
#* If the Views and/or Operations in a plugin make use of the Data-types located in other plugin, this plugin must depend on the Data-types plugin.
 
#* The connection and dependency between plugins is made through the '''plugin.xml''' file present in every plugin.
 
 
'''[[The_Plugin.xml_File | TO UNDERSTAND THE STRUCTURE OF THE plugin.xml FILE, FOLLOW THIS LINK]]'''
 
 
 
= OptFlux Architecture =
 
  
Version 2.3 (first fully open version of OptFlux) is composed of 5 inter-related projects, all of which are of major importance to OptFlux.
 
  
* ''''Utilitites''' - General utilities and datastructures developed at our group. This is used by most of our Projects as support.
 
* '''Solvers''' - A generic package of interaction between Java and some common LP, MIP and QP solvers. It supports interaction with QPGen, GLPK, CLP and CPLEX.
 
* '''JECoLi''' - The Java Evolutionary Computation Library. Our own Evolutionary Computation / meta-heuristics library. Find more at [http://darwin.di.uminho.pt/jecoli the JECoLi webpage].
 
* '''Metabolic''' - The metabolic package is the backbone of the OptFlux application. All individual API's for interaction with the operations/methods of OptFlux are herein implemented. Including MOMA, ROOM, FBA, rFBA, pFBA, etc...
 
* '''OptFluxCore''' - The glue between all the last and a specialization of the AIBench platform. OptFluxCore provides Graphical User Interfaces (GUIs), intuitive operations and datatypes to easily interact with all the methods provided by the Metabolic package. It also provides the plug-in engine allowing for users to expand OptFlux to their own needs.
 
  
Focusing on the '''OptFluxCore''' project, we have 6 standard plug-ins that provide all the basic functionalities in the release version.
 
  
This six plug-ins are the following:
 
 
* '''optflux.core''' - the core datatypes, viewers and operations to load/export and interact with models in several formats
 
* '''optflux.simulation''' - simulation related datatypes, operations and views. Wild-type, Gene and Reaction KO. (FBA, MOMA, ROOM, FVA, etc...)
 
* '''optflux.optimization''' - optimization specific datatypes, operations and views (Gene and Reaction KO optimization)
 
* '''optflux.biovisualizer''' - our own visualizer for biochemical networks. Support for CellDesigner layouts
 
* '''optflux.saveloadquit''' - just a save / load / quit project dedicated plug-in. Datatype agnostic as long as data is serializable.
 
* '''optflux.extraviewers''' - some extra viewers that we decided to include in the core release.
 
  
 
= Your first basic plug-in =
 
= Your first basic plug-in =
  
 
Go to [[Developers_First_Plugin]]!
 
Go to [[Developers_First_Plugin]]!
 
= Deep into the OptFlux Specifics =
 
 
 
== Operations in OptFlux ==
 
 
 
== The Datatypes of OptFlux ==
 
 
 
== Views in OptFlux ==
 
 
  
 
= Deployment and versioning =
 
= Deployment and versioning =

Please note that all contributions to Optflux may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Optflux:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)