2.4 Using the Loader

Video in TIB AV-Portal: 2.4 Using the Loader

Formal Metadata

2.4 Using the Loader
Title of Series
Part Number
Number of Parts
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
00:09 Using the Loader 00:34 Introducing the loader... 03:36 Loader definition 08:18 Creating example files 10:24 More complex example 14:08 Using the loader to upload/download data 15:55 Assignment #8: Add a loader
Metropolitan area network Simulation Structural load File format Booting Urinary bladder
Axiom of choice Structural load Multiplication sign Sheaf (mathematics) Parameter (computer programming) Arm Computer programming Mathematics Insertion loss Different (Kate Ryan album) Cuboid Error message Descriptive statistics Exception handling Metropolitan area network Structural load Computer file Electronic mailing list Bit Type theory Message passing Order (biology) output Right angle Pattern language Ocean current Game controller Computer file Maxima and minima Device driver Menu (computing) Mass Drop (liquid) Discrete element method Value-added network Number Ring (mathematics) Software testing Gamma function Booting Default (computer science) Matching (graph theory) Interface (computing) Uniqueness quantification Physical law Directory service Sturm's theorem Mathematics Word Personal digital assistant
Metropolitan area network Physical law Resonator Booting
Metropolitan area network Vapor barrier Resonator Computer simulation Menu (computing) Bookmark (World Wide Web) Computer icon Vector potential Number Graphical user interface Different (Kate Ryan album) Personal digital assistant Data structure Booting
Scripting language Metropolitan area network Digital electronics Structural load Computer simulation Hand fan Computer programming Personal digital assistant Different (Kate Ryan album) String (computer science) Order (biology) Quicksort Booting Spacetime
Simulation Haar measure Personal digital assistant Different (Kate Ryan album) Computer simulation Menu (computing) Booting Resultant Punched card
Metropolitan area network Computer file Personal digital assistant Different (Kate Ryan album) Booting
Area Metropolitan area network Game controller Computer file Code Structural load Interface (computing) Correspondence (mathematics) Multiplication sign Sheaf (mathematics) Maxima and minima Menu (computing) Computer programming Word String (computer science) output Computer worm Right angle Gamma function Booting
Point (geometry) Metropolitan area network Default (computer science) Graph (mathematics) Touchscreen Code Spiral Electronic mailing list Sheaf (mathematics) Set (mathematics) Branch (computer science) Directory service Computer programming Element (mathematics) Inclusion map Sample (statistics) Personal digital assistant Computer configuration Order (biology) Interface (computing) Website Gamma function Booting
Ocean current Metropolitan area network Software engineering Default (computer science) Game controller Computer file Physical law Sheaf (mathematics) Electronic mailing list Maxima and minima Branch (computer science) Directory service Function (mathematics) Hand fan Computer programming Number Personal digital assistant Touch typing Statement (computer science) output Right angle Gamma function Booting
Ocean current Point (geometry) Web page Metropolitan area network Group action Regulärer Ausdruck <Textverarbeitung> Link (knot theory) Information systems Multiplication sign Bit Grand Unified Theory Parameter (computer programming) Mereology Unruh effect Personal digital assistant Different (Kate Ryan album) Game theory Endliche Modelltheorie Gamma function Booting Resultant YouTube Newton's law of universal gravitation
while I hand out how online simulation and more work for nanotechnology bought format
so you've seen a few of the advanced features in rapture I wanna show you 1 more and called the loader and I think I should apologize in advance because I really shouldn't show you this at 3 30 at the end of a very long day when you've been slogging the GDP everything else all day long and gives you guys are probably getting a little tired and this is really going to kill you so hang on their love are
there's a thing rapture called the loaded and it's a fairly simple concept and suppose you have a couple of test cases that you want people to be able to load up so you know lot at test case stay with these values load test case B with these other values that's a good thing to have for your tool because when somebody goes to run mutual they like to have a couple of examples that they can run that work out of the box again so they can try try things out without really knowing what they're supposed to type in so there's this thing in rapture called the that does that and a lotta looks like a combo box on but it usually at the top of your interface and and the choices on the combo box example cases of column that and so when you put a loader on your interface and look kind like that combo box that I'm showing you right up here that's a right there that thing so the interesting thing about the loader is that you look at these different example cases including will see how to upload and things like that of the example cases that you load you can set various values within the interface so when I load when I when I wrote it a case called change will slow the drop down menu i say change well it will load an example case that may be changes at the 1st input and the 2nd input I can have set the 1st input to 1st and the 2nd input to 2nd change does that in other words the loader can change other controls in rapture that's interesting right it's loading example case and its setting other values in the interface you notice that left the mass along the mass was 10 grams and let the mass alone so all we did was change the 1st 2 controls I might also choose the cases this change 1st if I do that choose the case in this case an example case change 1st only changes the 1st input and changes it to the value hello and it leaves everything else alone and there's also a case for change 2nd where if I choose that next it will change the 2nd input but leave the others along so couple of things the loader loads of values for an example case it feels those values in all the various controls in your program it can change some and not others because in some cases when you load up an example case you just want a few things to change the you know 1 of the things when we other things at their default values or whatever the user selected so the loader is a little tricky that way changes controls and not always all of them depending on what you do there is also a new case a lot of times with the loader it's a good idea to give the user a way to reset back to the beginning so they they chose the new cases then maybe reset everything the blank or enter a new value or something like that so bloated usually comes along with the new case that lets you start fresh or
order is 1 of the things that's not yet built into the builder so be really great this lecture would already be over by now if all you had to do was drag it over from the builder and drop it in the year 2 0 and unfortunately it's not like that when you add the loader year tool the only way to do it is by adding into the tool definition the tool that XML so I'm a show you how to do it and it always takes like a couple of passes for people to understand how it's working so the 1st thing inside my tool that XML I can add a little stands out like this but I I have low order and then about with a label and a description and some other stuff and then slashed loaded right so as long as you have that much rapture recognizes that the there's a loader in your program the label of the loaded will be in the about label section it says example here so you notice over on the left hand side is as example colon right so you can set the label that the next to the loader using that label parameter you can set the description 2 that's the tooltip that pops up when you touch the loaded now the question is what he would have been the loader we want the loaded show 1 thing you can do is have a have a new case is the other is the new thing right there I think I have a thing for that and examples I guess I both so let's start with examples in the example the ICA example start XML and what that does is it finds all the examples that it can and loads them on that menu so if I say example start out XML it'll look for a bunch of XML files and for each 1 it finds it will treat that as an example case for the load so where those XML files from from wherever you're tool that XML is sitting you can make a directory called examples rapture looks for that has to be called examples the exam pl yes and inside there you can create a bunch of XML files these are just like the tool that amount you copy the tool that XML given a unique name and fill current values hey that's what we've been doing all from last 2 days to make driver files right so basically all you're doing is making a bunch of driver files so you cannot be a tool that XML you added it make it into a driver file and put it in this directory and then tell the loader to look for those things there and the lower will look in the examples directory find all the files that match started out XML and will add them onto the loader menu so that's it really if you understand driver files you understand the loader it's all we're doing is also the case of new there's a new is a little different because I didn't want to appear alphabetically I wanted it to be at the top of the list so there's a special entry for new and if you don't want to have a new case you don't have to but if you do have a new case you put the tag new and then given the name new not XML and it'll be at the top of the list of of new that question you have a question was the name of the folder is examples and yet the tag is only example why is that it's a little bit historical what I found on there is a difference with the yes on the folder has to be called examples and the tag is called example the reason is because in the early days of rapture used to have an example tag and I named each 1 of these files I have an example tagged for first . xml I have another 1 per 2nd on XML and another 1 for both that XML and you can do that I found it was a nuisance to do that and so I had the idea that I can treat it as a pattern and it would look for all the start out XML so and that way as I add new files they automatically get picked up what I found was I was adding new files for the examples and they wouldn't show up the error have to add the tag in there before show up so I added this business of start out XML and it picks up all of them and or you can specify just 1 of them at a time new is like that to render specifying 1 file of the new file so that's the loader and then the last thing is the default value I have to say which 1 won the loader 1st comes up what's the default example and usually it's the new case but it could be anything and then you don't have to have a default think in which case the loader does nothing but it won't do anything the 1st pop up so that's it if you put that XML India tool that XML and if you have an example case is set up you're done that's all there is to it well almost optional initially again if I take tool that XML and I copy it and if I added it you put in current values for all the controls that you what you also need to add a little bit about label and description to the top that that's used by the combo box or combo box needs to know what I call this thing you want give a weird file name instead you can put whatever label you want might change well and you can even put a description in there so as you're creating these example cases think like driver files except that they also have an about label and description at the top so if you do that if you happier to about XML and you create about section and you add in a few current values you have an example case for the loaded that's all there is to look seriously at all there is and I don't think there's anything more drive anything more and that's the description that's the current values I guess the 1 other thing I can say is that if you don't set a current value for a particular control that it will change so you know this number in a minute ago I showed you the example of change both so this is the change both it's going to change both but if I only wanted to change 1 and not the others then I would use that 1 current value and not give the other 1 a current value that you delete stuff that's not being used but you know any controls that you don't wanna set you just leave them out a year and so what the law does is it looks at this file that matches this file against the tool that XML and if it finds the correct value for control in this file and if they can find the corresponding control in the tool that XML that it says all set that that all was occurring values so that the that it just goes through if it can't find a match if there is a mismatch it'll ignore stuff or if there's something missing There's no current values and nothing happens so copy the tool that XML and the about Label Description and putting current values for anything that you want to change to change and that's here is a little bit more
complex example of the loader this resonant tunneling diode and just let me show you a quick how that looks
because it's so you can get a better sense of what the law does and so so good and in Ohio
I FI log
around this a resonant tunneling diode simulator
which is 1 of my favorites that OK so here's an
example tool and you can start to recognize some of this stuff now right and this is a number in rapture and I added the presets for . down menu and this is another number applied bias and I use the little icon for that and here some numbers this thing is something we haven't talked about yet it's called a structure of the more complicated things in rapture that we haven't quite talked about yet up top is the loader and the low water has a bunch of different example cases that we can load I can simulate a 1 barrier device and you notice the structure changed I can simulate 3 barrier device and again you notice the structure changed down below so when I'm choosing things off the loader it's changing other controls in in the graphical interface so this is a more complicated example because it shows you some of the potential of what you can do with the loader and the mystery another example it's a little simpler but of chooses this
space program so the
space program is a circuit simulator again back from the 19 seventies as a sort of a really old program was still useful today it has a low order at the top and the loader as usual new and upload and download and then it just has a bunch of different cases and I can choose this case and it loads up a script in this strain if I choose this case it'll load up a different script in this string so when I'm choosing things off the loader all it's doing is setting this string and then when I click simulate it'll go and run
that case and I can back up now and I can choose a different example and run and run
that case and show me the results right so I can simulate lots of different cases off the loader just by picking them off the menu so and that their ordering realism and get all these different results the loader also has the new case which resets everything the way it was when the simulation started and so reminds everybody you know enter your input deck here are there's also it's also got built-in upload and download
so it can pop up the the loader knows out pop up and prompt me for a file the spice file that I want to load off my desktop or I can copy and paste spy stuff in here so I can copy and paste in something like a low and upload and now
it's there so that's what the loader is it's basically a way of loading different example cases having a new case that clears everything out or uploading and downloading stuff from your desktop so that's a
load the thing up top and it changes the rest of the interface like I just showed you know I showed you
that upload download stuff initially the code for how that works inside the loader if you want to be able to upload things into your program you can upload section and you can have multiple to target so you can say I want upload into that single input that string indirect and also uploaded to input that string data file a lot of times people asked me hey my program needs a datafile how would do it with a datafile enraptured by a data file enrapture is a string anything I suppose I suppose just about anything be a string but even like if it's a megabyte longer 10 megabytes worth of data you can treat that as a string in rapture and a lot of times when you're expecting people to upload stuff from their desktop into that data file you can do it like this you can use the loader and they can choose files from their desktop and upload them into the string basically the string you can just think of as a preview word showing you what's in the file and so just by adding a section for upload and all the different controls the 1 old upload until I can also add a corresponding section for download it and all the things I would be able to download from so someone can upload into the datafile area and then they could download from the data file area back to their desktop either way on that useful I might use example you might say well want that example was saying that example so I choose the example from the loader and I download it to my desktop right so was just download download section and then add the name of the control that you won't be able to download from usually it's just 1 strain but it could be 5 or 6 strings or whatever so that's how those things correspond to those sections correspond to the to the entries on the menu by that's the
end of the story so there is but now in order to make it seem can you guys gotta try so what we're going to do is where they continue with the last lab assignment the Morgan at a low order now in due to all the remember the can is the builder to do this this time you're on your own you got edit your tool that XML code by hand and it helps if you go to the rapture website or if you look at the notes on inmate rapture website under the documentation and under the gooey XML elements you can find examples that talk about the loader and how it works so if you're wondering about this loader and you want to take a look at the code and had a copy and paste the example code is in the documentation or you can use the notes from the course either way but what I want you to do is add a up at the top here you can see right here I want you to add 3 crossed 3 cases under the loaded I want you to create a fancy cross case of flower cases and upon branch case and the this is these are the values if you use 13 negative 783 it'll give you the fancy cross and then if you use these values it'll look like a flower and if you use these look like a palm branch so you can add more cases to if you want but I'll make a loader that has at least those 3 cases I didn't use new here I didn't use upload download you don't have to and you can just use those 3 cases in the loader and add that in your tool that XML tried out right so here's my solution for this lab assignment I wanna download it to the top of this spiral graph program with these 3 cases so let me get back into my workspace so
remember the loader is something that you have it does it is in in the builder unfortunately I apologize for that is 1 of those things on my to do list to integrate that into the builder because it's the 1 thing that gives people the most trouble in rapture and but for now what you have to do it by hand and the way you do it by hand is by adding the tool about XML and adding a little section at the top for the loaded so here's my little definition of a loader and I have a loaded with about label that is the label when it appears on the screen I set and a set of example cases are start out XML which means anything they can find . xml in the examples directory and the house David default and you might want to set a default like the cross is a good example or you might not want to and you might have a new option and the new might be the default so there are a few different ways to do this at that point it becomes like I you know season to taste whether or not add the new 1 and whether which 1 is the appropriate default for your tool that's up to you and I chose the cross as an example and I never knew I just had a bunch of examples so the 1 trick is to make sure that that loader is inside
the input section if 1 of the inputs in your program is the very top most input and I usually listed 1st although I think if you list later rapture will show that the top anyway but I usually put it right at the top inside the input so you have to add that to your tool that XML and then save it out
and then we make a directory called examples like that I've already got 1 so let me go into that directory and you create a file in this directory for each case and so what I do is I copied the tool that XML from above and let me do 1 now greater new case called knew that XML and in that new OK so I'm going to do 2 things 1st and then look through all of the inputs and set current value so for each number and that is the current value current and slash current be careful about mismatch tags and I'll get a minus 27 of them and then for this input to current and slash current and given the value of 9 and then the next number of current and slashed current and given the value of 31 of correct now I have all the inputs to have this add comments and I have the comment strength I can decide for myself whether or not I want the loaded touch those if I want the loaded is set those that I need to separate values of I don't set Current values than loader leave alone in fact I could even go further and say I'm just going get rid of all that so I could say there goes that and there goes that and I could delete all of that and again if it's not there the loader ignores it if it can't find a current value which is does nothing so whether or not the control is there or whatever the law also ignores everything in the output section and the loader also ignores itself so basically goes in your tool it looks in the input section for all the current values it confined and that it sets those current values in the year 2 0 so that I have a new case here and I can say that if I go up and run my tool I can see that I've got fancy cross flower palm branch and full example number 1 was example number 1 that's the new case I just created I didn't give it a name all I did was put a bunch a current values in there so let me let me fix that I can edit that new case and at the very top right inside the run I can add about section with the label of a collar extra case so if I just add that right at the very top just inside the run see here's my running and here's my about that describes this case now fire rapture now fancy crosses the default but there's also an extra case on the list so that's how you make new examples and because I set up my program my tool that XML looks for all of the star . xml examples folder whenever I put a new case in that directory will automatically get sucked in to my program it'll show up in the list I couldn't really explicit instead of you know start out XML like that I could have a bunch statements that said fancy that XML and I knew that XML and not XML and all that so you can be real explicit with the file names but it's easier just to say start out XML and then whenever a new file shows up it just gets loaded up into the lower so so that's it it's the 2 steps for the loader I have to add it in to the tool that XML like that and then I have
to create all the different example cases and make sure each of them has current values and about label and then it runs you notice when you select a case it doesn't do anything much it just changes the values a little bit so I can select a case and get different values and select this case change my mind and so forth is that until I simulate that I get who out that turned out really good and I keep that extra case and then I can simulate again so I can choose a different 1 and simulate again and then I can flip back and forth between the solutions I guess and see see how they look so that's that's it at this point we have a pretty good tool here right we got a tool that's gonna lower at at the top it's got some notes but it's got groups of model parameters we used enable and disable producing results it's a pretty respectable tools and you can put all kinds of really great documentation and so when you click on the link in the notes to parts of the page that brings up the explanation of what that's all about money is YouTube video game maker YouTube video and put it out there and link it India tool that way and point to a lecture then of a maybe a couple of times so that makes a pretty
functional tools and the loader is just really nice because it helps people when they're getting started with the 2 will explore the tool by loading up example cases


  555 ms - page object


AV-Portal 3.20.2 (36f6df173ce4850b467c9cb7af359cf1cdaed247)