1 package jarmos.app.activity.rb;
6 import java.util.ArrayList;
8 import java.util.Random;
10 import org.achartengine.GraphicalView;
11 import org.achartengine.chart.PointStyle;
12 import org.achartengine.model.XYMultipleSeriesDataset;
13 import org.achartengine.model.XYSeries;
14 import org.achartengine.renderer.XYMultipleSeriesRenderer;
15 import org.achartengine.renderer.XYSeriesRenderer;
18 import android.app.Activity;
19 import android.app.AlertDialog;
20 import android.app.Dialog;
21 import android.content.Context;
22 import android.content.DialogInterface;
23 import android.content.Intent;
24 import android.graphics.Color;
25 import android.os.Bundle;
26 import android.os.Handler;
27 import android.os.Message;
28 import android.text.InputType;
29 import android.util.Log;
30 import android.view.KeyEvent;
31 import android.view.Menu;
32 import android.view.MenuInflater;
33 import android.view.MenuItem;
34 import android.view.MotionEvent;
35 import android.view.View;
36 import android.widget.Button;
37 import android.widget.EditText;
38 import android.widget.LinearLayout;
39 import android.widget.TableLayout;
40 import android.widget.TableRow;
41 import android.widget.TableRow.LayoutParams;
42 import android.widget.TextView;
43 import android.widget.Toast;
57 private static final String DEBUG_TAG =
"OutputPlotter";
67 private GraphicalView mChartView;
70 private int[] mColors;
73 private boolean[] plotRemoved;
76 private int add_sweep_pts_toggle;
80 private int labeled_series;
83 private int labeled_time_point;
86 private double progressXVal;
90 private double progressYVal;
111 private TextView xMinView;
112 private TextView xMaxView;
131 private Bundle extras;
133 private int current_output;
140 super.onCreate(savedInstanceState);
141 setContentView(
R.layout.rb_output_plotter_layout);
143 extras = getIntent().getExtras();
146 if (extras.getBoolean(
"isSweep",
false)) {
147 sweepIndex = extras.getInt(
"sweepIndex");
149 title = extras.getString(
"title");
150 dt = extras.getDouble(
"dt");
151 xMin = extras.getDouble(
"xMin");
152 xMax = extras.getDouble(
"xMax");
153 xLabel = extras.getString(
"xLabel");
158 add_sweep_pts_toggle = 2;
159 labeled_time_point = -1;
160 progressXVal = xMin - 1;
165 for (
int time_step = 0; time_step <
n_time_steps; time_step++) {
171 double[][] RB_output_error_bounds_all_k =
new double[
n_outputs][];
174 RB_output_error_bounds_all_k[i] = extras.getDoubleArray(
"output_bound_" + i);
184 for (
int time_step = 0; time_step <
n_time_steps; time_step++) {
186 - RB_output_error_bounds_all_k[i][time_step];
188 + RB_output_error_bounds_all_k[i][time_step];
194 plotRemoved[i] =
true;
196 plotRemoved[0] =
false;
199 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
201 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
204 TableLayout legendLayout = (TableLayout) findViewById(
R.id.legendLayout);
206 int n_labels_per_row = 5;
208 TableRow row =
new TableRow(
this);
209 row.setLayoutParams(
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
212 while (count < n_outputs) {
213 TextView legend_i =
new TextView(
this);
214 if (count % n_labels_per_row == 0)
215 legend_i.setText(
" " +
"output " + (count + 1) +
" ");
217 legend_i.setText(
"output " + (count + 1) +
" ");
218 legend_i.setTextColor(mColors[count]);
219 legend_i.setLayoutParams(
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
222 legend_i.setBackgroundColor(Color.WHITE);
224 row.addView(legend_i);
227 row.setBackgroundColor(Color.WHITE);
232 if ((count + 1) % n_labels_per_row == 0) {
233 legendLayout.addView(row,
new TableLayout.LayoutParams(LayoutParams.FILL_PARENT,
234 LayoutParams.WRAP_CONTENT));
236 row =
new TableRow(
this);
237 row.setLayoutParams(
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
240 legendLayout.addView(row,
new TableLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
242 Button visButton = (Button) findViewById(
R.id.unsteadyVisButton);
243 visButton.setOnClickListener(
new View.OnClickListener() {
245 public void onClick(View view) {
247 intent.putExtras(OutputPlotterActivity.this.getIntent().getExtras());
248 OutputPlotterActivity.this.startActivity(intent);
264 protected XYMultipleSeriesDataset
buildDataset(String[] titles, List<
double[]> xValues, List<
double[]> yValues) {
265 XYMultipleSeriesDataset dataset =
new XYMultipleSeriesDataset();
268 yMin = yMax = (yValues.get(0))[0];
269 for (
int i = 0; i < num_series; i++) {
270 XYSeries series =
new XYSeries(titles[i]);
271 double[] xV = xValues.get(i);
272 double[] yV = yValues.get(i);
273 int seriesLength = xV.length;
275 for (
int k = 0; k < seriesLength; k++) {
279 if ((xV[k] >=
xMin) && (xV[k] <=
xMax) && !plotRemoved[i / 3])
280 series.add(xV[k], yV[k]);
281 if (yV[k] < yMin && !plotRemoved[i / 3])
283 if (yV[k] > yMax && !plotRemoved[i / 3])
286 dataset.addSeries(series);
291 XYSeries series =
new XYSeries(
"");
292 series.add(progressXVal, yMin);
293 series.add(progressXVal, yMax);
294 if (
sweepIndex == -1 || progressYVal > yMax || progressYVal < yMin)
296 series.add(progressXVal, progressYVal);
297 dataset.addSeries(series);
312 XYMultipleSeriesRenderer renderer =
new XYMultipleSeriesRenderer();
316 XYSeriesRenderer r_out =
new XYSeriesRenderer();
317 XYSeriesRenderer r_LB =
new XYSeriesRenderer();
318 XYSeriesRenderer r_UB =
new XYSeriesRenderer();
323 mColors[0] = Color.BLUE;
324 r_out.setColor(Color.BLUE);
325 r_LB.setColor(Color.BLUE);
326 r_UB.setColor(Color.BLUE);
329 mColors[1] = Color.RED;
330 r_out.setColor(Color.RED);
331 r_LB.setColor(Color.RED);
332 r_UB.setColor(Color.RED);
335 mColors[2] = Color.GREEN;
336 r_out.setColor(Color.GREEN);
337 r_LB.setColor(Color.GREEN);
338 r_UB.setColor(Color.GREEN);
341 mColors[3] = Color.CYAN;
342 r_out.setColor(Color.CYAN);
343 r_LB.setColor(Color.CYAN);
344 r_UB.setColor(Color.CYAN);
347 mColors[4] = Color.YELLOW;
348 r_out.setColor(Color.YELLOW);
349 r_LB.setColor(Color.YELLOW);
350 r_UB.setColor(Color.YELLOW);
353 mColors[5] = Color.MAGENTA;
354 r_out.setColor(Color.MAGENTA);
355 r_LB.setColor(Color.MAGENTA);
356 r_UB.setColor(Color.MAGENTA);
359 mColors[6] = Color.GRAY;
360 r_out.setColor(Color.GRAY);
361 r_LB.setColor(Color.GRAY);
362 r_UB.setColor(Color.GRAY);
365 mColors[7] = Color.BLACK;
366 r_out.setColor(Color.BLACK);
367 r_LB.setColor(Color.BLACK);
368 r_UB.setColor(Color.BLACK);
371 Random numGen =
new Random();
372 mColors[i] = Color.argb(255, numGen.nextInt(256), numGen.nextInt(256), numGen.nextInt(256));
373 r_out.setColor(mColors[i]);
374 r_LB.setColor(mColors[i]);
375 r_UB.setColor(mColors[i]);
379 r_out.setPointStyle(PointStyle.X);
380 r_LB.setPointStyle(PointStyle.POINT);
381 r_UB.setPointStyle(PointStyle.POINT);
383 renderer.addSeriesRenderer(r_out);
384 renderer.addSeriesRenderer(r_LB);
385 renderer.addSeriesRenderer(r_UB);
388 XYSeriesRenderer r_add =
new XYSeriesRenderer();
389 r_add.setColor(Color.BLACK);
390 r_add.setPointStyle(PointStyle.POINT);
391 renderer.addSeriesRenderer(r_add);
422 renderer.setChartTitle(
title);
423 renderer.setXTitle(
xLabel);
424 renderer.setXAxisMin(
xMin);
425 renderer.setXAxisMax(
xMax);
426 renderer.setAxesColor(Color.BLACK);
427 renderer.setLabelsColor(Color.BLACK);
430 renderer.setDisplayChartValues(
true);
433 renderer.setXLabels(10);
434 renderer.setYLabels(10);
435 renderer.setChartValuesTextSize(16);
438 renderer.setApplyBackgroundColor(
true);
439 renderer.setBackgroundColor(Color.WHITE);
442 renderer.setShowLegend(
false);
452 public GraphicalView
execute(Context context) {
454 String[] labels =
new String[3 *
n_outputs];
456 labels[3 * i] =
"output " + (i + 1);
457 labels[3 * i + 1] =
"LB " + (i + 1);
458 labels[3 * i + 2] =
"UB " + (i + 1);
461 List<double[]> t =
new ArrayList<double[]>();
462 List<double[]> output_values =
new ArrayList<double[]>();
481 boolean sweepInProgress = !(progressYVal == yMin);
482 labeled_series = sweepInProgress ? n_outputs * 3 : labeled_series;
485 labeled_series, labeled_time_point, sweepInProgress);
486 return new GraphicalView(context, theChart);
490 if (event.getAction() == MotionEvent.ACTION_DOWN) {
491 float X = event.getX();
493 if (add_sweep_pts_toggle == 0)
495 else if (add_sweep_pts_toggle == 1)
497 Log.d(DEBUG_TAG,
"touch point (x) = " + (event.getX() - 15) / 290);
499 if (event.getAction() == MotionEvent.ACTION_UP) {
510 xpos = xpos < 0.01f ? 0.01f : xpos;
511 xpos = xpos > 0.99f ? 0.99f : xpos;
517 * ((
xMax -
xMin) / (extras.getDouble(
"xMax") - extras.getDouble(
"xMin")));
520 * (
xMin - extras.getDouble(
"xMin")) / (extras.getDouble(
"xMax") - extras.getDouble(
"xMin"))
524 int leftmostStep = 0;
531 int closestTimestep = 0;
539 int firstVisible = 0;
540 while (plotRemoved[firstVisible])
544 int ts = closestTimestep + leftmostStep;
547 progressXVal = xcurrent;
553 add_sweep_pts_toggle = 2;
556 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
558 layout.removeAllViews();
559 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
563 SolveThread st =
new SolveThread();
575 xpos = xpos < 0.01f ? 0.01f : xpos;
576 xpos = xpos > 0.99f ? 0.99f : xpos;
581 int leftmostStep = 0;
588 int closestTimestep = 0;
595 if (closestTimestep > 0)
596 closestTimestep =
time_step_array[closestTimestep + leftmostStep] - xAxisValue > xAxisValue
597 -
time_step_array[closestTimestep + leftmostStep - 1] ? closestTimestep - 1 : closestTimestep;
603 labeled_time_point = closestTimestep * 2;
604 Log.d(DEBUG_TAG,
"Closest timestep: " + closestTimestep);
607 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
609 layout.removeAllViews();
610 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
623 dialog =
new Dialog(
this);
624 dialog.setContentView(R.layout.rb_axes_dialog);
625 dialog.setTitle(
"Coordinate Axes Options");
626 dialog.setCancelable(
false);
629 TextView xMinLabel = (TextView) dialog.findViewById(
R.id.x_min_label);
630 xMinLabel.setText(
"Minimum x-value");
631 xMinView = (EditText) dialog.findViewById(
R.id.x_min_entry);
632 xMinView.setText(String.valueOf(
xMin));
633 xMinView.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL
634 | InputType.TYPE_NUMBER_FLAG_SIGNED);
636 TextView xMaxLabel = (TextView) dialog.findViewById(
R.id.x_max_label);
637 xMaxLabel.setText(
"Maximum x-value");
638 xMaxView = (EditText) dialog.findViewById(
R.id.x_max_entry);
639 xMaxView.setText(String.valueOf(
xMax));
640 xMaxView.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL
641 | InputType.TYPE_NUMBER_FLAG_SIGNED);
644 Button resetButton = (Button) dialog.findViewById(
R.id.reset_default);
645 resetButton.setOnClickListener(
new View.OnClickListener() {
647 public void onClick(View view) {
649 xMin = extras.getDouble(
"xMin");
650 xMax = extras.getDouble(
"xMax");
651 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
652 mChartView =
execute(getApplicationContext());
653 layout.removeAllViews();
654 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
663 Button okButton = (Button) dialog.findViewById(
R.id.axes_okButton);
664 okButton.setOnClickListener(
new View.OnClickListener() {
666 public void onClick(View view) {
669 String userMinString = xMinView.getText().toString();
672 userMin = Double.parseDouble(userMinString);
673 }
catch (NumberFormatException e) {
676 userMin = extras.getDouble(
"xMin") - 1;
680 String userMaxString = xMaxView.getText().toString();
683 userMax = Double.parseDouble(userMaxString);
684 }
catch (NumberFormatException e) {
687 userMax = extras.getDouble(
"xMax") + 1;
692 if ((userMax > userMin) && (userMax <= extras.getDouble(
"xMax"))
693 && (userMin >= extras.getDouble(
"xMin"))) {
701 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
702 mChartView =
execute(getApplicationContext());
703 layout.removeAllViews();
704 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
706 Toast.makeText(getApplicationContext(),
"Value out of bounds", Toast.LENGTH_SHORT).show();
715 String[] plotStrings =
new String[
n_outputs];
718 plotStrings[i] =
"output " + (i + 1);
721 boolean[] plotBooleans =
new boolean[
n_outputs];
723 if (plotRemoved[i] ==
true)
724 plotBooleans[i] =
false;
726 plotBooleans[i] =
true;
729 AlertDialog.Builder builder =
new AlertDialog.Builder(OutputPlotterActivity.this);
730 builder.setTitle(
"Enable/Disable Plots");
731 builder.setMultiChoiceItems(plotStrings, plotBooleans,
new DialogInterface.OnMultiChoiceClickListener() {
732 public void onClick(DialogInterface dialog,
int item,
boolean checked) {
735 plotRemoved[item] =
false;
737 plotRemoved[item] =
true;
741 builder.setNeutralButton(
"OK",
new DialogInterface.OnClickListener() {
742 public void onClick(DialogInterface dialog,
int item) {
744 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
745 mChartView =
execute(getApplicationContext());
746 layout.removeAllViews();
747 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
750 dialog = builder.create();
753 AlertDialog.Builder builder2 =
new AlertDialog.Builder(OutputPlotterActivity.this);
755 String[] labelStrings =
new String[3];
756 labelStrings[0] =
"Add sweep points";
757 labelStrings[1] =
"Show data labels";
758 labelStrings[2] =
"Do nothing";
760 boolean[] labelBooleans =
new boolean[3];
761 labelBooleans[add_sweep_pts_toggle] =
true;
763 builder2.setTitle(
"Set on touch behavior");
764 builder2.setMultiChoiceItems(labelStrings, labelBooleans,
765 new DialogInterface.OnMultiChoiceClickListener() {
766 public void onClick(DialogInterface dialog,
int item,
boolean checked) {
768 add_sweep_pts_toggle = 0;
773 add_sweep_pts_toggle = 1;
781 int visibleCount = 0;
783 if (plotRemoved[i] ==
false)
786 if (visibleCount > 1) {
791 add_sweep_pts_toggle = 2;
793 labeled_time_point = -1;
796 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
797 mChartView =
execute(getApplicationContext());
798 layout.removeAllViews();
799 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT,
800 LayoutParams.FILL_PARENT));
808 String[] labelStrings =
new String[2];
809 labelStrings[0] =
"Show data labels";
810 labelStrings[1] =
"Do nothing";
812 boolean[] labelBooleans =
new boolean[2];
813 if (add_sweep_pts_toggle == 1)
814 labelBooleans[0] =
true;
816 labelBooleans[1] =
true;
818 builder2.setTitle(
"Set on touch behavior");
819 builder2.setMultiChoiceItems(labelStrings, labelBooleans,
820 new DialogInterface.OnMultiChoiceClickListener() {
821 public void onClick(DialogInterface dialog,
int item,
boolean checked) {
823 add_sweep_pts_toggle = 2;
828 add_sweep_pts_toggle = 1;
836 int visibleCount = 0;
838 if (plotRemoved[i] ==
false)
841 if (visibleCount > 1) {
845 labeled_time_point = -1;
848 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
849 mChartView =
execute(getApplicationContext());
850 layout.removeAllViews();
851 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT,
852 LayoutParams.FILL_PARENT));
861 dialog = builder2.create();
864 String[] plotStrings2 =
new String[
n_outputs];
867 plotStrings2[i] =
"output " + (i + 1);
870 AlertDialog.Builder builder3 =
new AlertDialog.Builder(OutputPlotterActivity.this);
871 builder3.setTitle(
"Show labels for which output?");
872 builder3.setItems(plotStrings2,
new DialogInterface.OnClickListener() {
873 public void onClick(DialogInterface dialog,
int item) {
875 labeled_series = item;
878 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
879 mChartView =
execute(getApplicationContext());
880 layout.removeAllViews();
881 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
884 dialog = builder3.create();
887 AlertDialog.Builder infoBuilder =
new AlertDialog.Builder(OutputPlotterActivity.this);
888 infoBuilder.setTitle(
"Current Parameters");
890 String message =
"Online N = " + RBActivity.mOnlineNForGui +
"\n\n" +
"Parameters: \n\n";
891 double[] param = RBActivity.rb.mRbSystem.getParams().getCurrent();
892 for (
int i = 0; i < param.length; i++) {
894 message = message + (i + 1) +
": " +
"Sweep\n";
896 message = message + (i + 1) +
": " + param[i] +
"\n";
898 message = message +
"\nChange values?";
899 infoBuilder.setMessage(message);
900 infoBuilder.setPositiveButton(
"Yes",
new DialogInterface.OnClickListener() {
901 public void onClick(DialogInterface dialog,
int id) {
905 infoBuilder.setNegativeButton(
"No", null);
906 dialog = infoBuilder.create();
919 MenuInflater inflater = getMenuInflater();
920 inflater.inflate(R.menu.rb_plotter_main_menu, menu);
926 switch (item.getItemId()) {
930 case R.id.change_axes:
933 case R.id.en_dis_plots:
946 private class SolveThread
extends Thread {
950 double xcurrent = progressXVal;
957 int xleft = icount - 1;
962 double max_time_step = 0;
963 int i_max_step = xleft + 1;
964 for (
int i = xleft; i < xright; i++) {
966 if (max_time_step < current_time_step) {
967 max_time_step = current_time_step;
973 rb.mRbSystem.getParams().setCurrent(
sweepIndex, xcurrent);
979 double[] new_time_step_array =
new double[
n_time_steps + 1];
981 new_time_step_array[i_max_step] = xcurrent;
984 int k = (j < i_max_step) ? j : j + 1;
985 new_time_step_array[k] = time_step_array[j];
993 if (rb.mRbSystem.isReal)
995 new_RB_outputs_all_k[n][i_max_step] = rb.mRbSystem.RB_outputs[n];
996 double OutputBound = rb.mRbSystem.RB_output_error_bounds[n];
997 new_RB_outputs_LB[n][i_max_step] = new_RB_outputs_all_k[n][i_max_step] - OutputBound;
998 new_RB_outputs_UB[n][i_max_step] = new_RB_outputs_all_k[n][i_max_step] + OutputBound;
1001 for (
int n = 0; n < n_outputs / 2; n++) {
1002 new_RB_outputs_all_k[n][i_max_step] = rb.mRbSystem.get_RB_output(n,
true);
1003 double OutputBound = rb.mRbSystem.get_RB_output_error_bound(n,
true);
1004 new_RB_outputs_LB[n][i_max_step] = new_RB_outputs_all_k[n][i_max_step] - OutputBound;
1005 new_RB_outputs_UB[n][i_max_step] = new_RB_outputs_all_k[n][i_max_step] + OutputBound;
1007 new_RB_outputs_all_k[n + n_outputs / 2][i_max_step] = rb.mRbSystem.get_RB_output(n,
false);
1008 OutputBound = rb.mRbSystem.get_RB_output_error_bound(n,
false);
1009 new_RB_outputs_LB[n + n_outputs / 2][i_max_step] = new_RB_outputs_all_k[n + n_outputs / 2][i_max_step]
1011 new_RB_outputs_UB[n + n_outputs / 2][i_max_step] = new_RB_outputs_all_k[n + n_outputs / 2][i_max_step]
1018 time_step_array = new_time_step_array;
1023 progressXVal =
xMin - 1;
1024 progressYVal = yMin;
1027 add_sweep_pts_toggle = 0;
1030 handler.sendEmptyMessage(0);
1033 private Handler handler =
new Handler() {
1034 public void handleMessage(Message msg) {
1035 LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
1036 mChartView =
execute(getApplicationContext());
1037 layout.removeAllViews();
1038 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
1044 if (event.getAction() == MotionEvent.ACTION_DOWN) {
1048 current_output += 1;
1049 if (current_output == n_outputs)
1052 plotRemoved[i] =
true;
1054 plotRemoved[current_output] =
false;
1056 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
1057 mChartView =
execute(getApplicationContext());
1058 layout.removeAllViews();
1059 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
1065 current_output -= 1;
1066 if (current_output == -1)
1067 current_output = n_outputs - 1;
1069 plotRemoved[i] =
true;
1071 plotRemoved[current_output] =
false;
1073 LinearLayout layout = (LinearLayout) findViewById(
R.id.chart);
1074 mChartView =
execute(getApplicationContext());
1075 layout.removeAllViews();
1076 layout.addView(mChartView,
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
1080 return super.onKeyDown(keyCode, event);
GraphicalView execute(Context context)
Executes the chart demo.
static final int INFO_DIALOG_ID
XYMultipleSeriesDataset buildDataset(String[] titles, List< double[]> xValues, List< double[]> yValues)
Builds an XY multiple dataset using the provided values.
static int mOnlineNForGui
Array of TextViews and SeekBars for constructing the parameter selection.
Main RB visualization activity.
static final int LABEL_DIALOG_ID
boolean onOptionsItemSelected(MenuItem item)
static RBContainer rb
The RB Container with all the system and model data (from JRB)
Base class for RB models and systems.
boolean onKeyDown(int keyCode, KeyEvent event)
void showPoint(float xpos)
Displays information on an individual user-selected point on the graph.
void setChartSettings(XYMultipleSeriesRenderer renderer, String title, String xLabel, double xMin, double xMax)
Sets a few of the series renderer settings.
Activity for output plotting of functions of time using the AChartEngine library. ...
Dialog onCreateDialog(int id)
This function takes care of constructing the dialogs that pop up.
void onCreate(Bundle savedInstanceState)
Constructor.
void add_sweep_point(float xpos)
Adds a new point in non-time-dependent problems on where a touch event has occurred.
A line chart implementation with a single label.
static final int PLOT_DIALOG_ID
boolean onPrepareOptionsMenu(Menu menu)
XYMultipleSeriesRenderer buildRenderer()
Builds an XY multiple series renderer.
double[][] RB_outputs_all_k
static final int AXES_DIALOG_ID
static final int WARNING_DIALOG_ID
boolean onTouchEvent(final MotionEvent event)