visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple parametric formulae

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
74rk



Joined: 12 Apr 2018
Posts: 11
Location: Tilburg, The Netherlands

PostPosted: Fri Apr 13, 2018 3:10 pm    Post subject: Multiple parametric formulae Reply with quote

I have the following situation: I want to display and calculate the deceleration (speed as a function of the position) of multiple train types where for each train type there are different brake force settings:

Type A, setting 1: -0.2m/s^2
Type A, setting 2: -0.3m/s^2
Type A, setting 3: -0.45m/s^2
Type B, setting 1: -0.15m/s^2
Type B, setting 2: -0.35m/s^2
Type B, setting 3: -0.5m/s^2

In reality I have 8 settings per type and 5 types.

The formula for each x-value is vinit*(#-1)+(0.5*a*(#-1)^2)
The formula for each y-value is vinit+a*(#-1)

note that vinit is initial speed in m/s and a is the value corresponding to type and setting in the list above

I have no clue how to make a list of (x,y)-pairs for each of the type-setting combinations. I need about 300 rows (= seconds) and I would like to either populate the whole table at once and use the masking options to display a subset, or be able to dynamically select a type and setting and plot that. I guess the latter isn't what would normally be done in DataGraph.

Note that I am a newbie.
_________________
René Knuvers
Sr. Engineer - LUCROS Railway Engineering
Back to top
View user's profile Send private message Visit poster's website
Pamela



Joined: 25 Feb 2017
Posts: 43

PostPosted: Mon Apr 23, 2018 12:04 pm    Post subject: Reply with quote

The short answer is that you could approach the problem in either way in DG.

First, to make a list of x-y pairs that you would mask, you need to have the numbers 1 to 300 (or how ever many rows you want) repeated for each of your scenarios (6).

Set up a group with you six options and add a column with an ID from 1 to 6 (e.g., Scenario)

Set up two global variables n=6, and rows=300.

Add Two functions:
Scenario = ceil(#/rows)
row# = #-(ceil(#/row)-1)*row
where the number of rows is "row*n"

You can use the Scenario to map to the variable "a" from your list of scenrios.
The row number is then used in place of # in your equation to calculate a list of your x,y pairs.

You can also use global variables, to dynamically calculate the values. Really you could do this a few differnt ways. The DG beta also has a clickable graphs so you could have a bar graph with your options and click on a "bar" to have your line graph update with that option.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group