I am working on an agent-based model and now I'm trying to experiment with CompareRuns.
when I execute the experiment, it should simulate the model several times and after each simulation, a dataset of sample data should be filled.
there is also a state chart in Main agent and each state has a traceln("..."). so after passing through each state, something must be printed.
the problem is that neither the print commands return anything, nor the dataset in which I store my data returns anything but zeros.
P.S.: I also have a GIS map in my model. could that be the reason for misbehaving of Anylogic?
I found the problem and fixed it.
check and double check all the "Parameter"s in the Main agent and make sure they all have different names and labels. the problem was that two parameters had same labels and it messed up the whole experiment.
I fixed the labels and the default value of all parameters, deleted the CompareRun experiment, made a new one and it worked.
Related
Can we change the output dataset path dynamically in the my_compute_function as show below
from transforms.api import transform, Input, Output
#transform(
my_output=Output("/path/to/my/dataset"),
my_input=Input("/path/to/input"),
)
def my_compute_function(my_output, my_input):
**my_output.path = "new path"**
my_output.write_dataframe(
my_input.dataframe()
)
No, this is not possible. The reason is that the inputs/outputs/transforms are fixed at "CI-time" or "build-time". When you press "commit" in Authoring or you merge a PR, a CI job is kicked off.
In this CI job, all the relations between inputs and outputs are determined. Output datasets that don't exist yet are created, and a "jobspec" is added to them. A "jobspec" is a snippet of JSON that describes to foundry how a particular dataset is generated.
Anytime you press the "build" button on a dataset (or build the dataset through a schedule or similar), the jobspec is consulted. It contains a reference to the repository, revision, source file and entry point of the function that builds this dataset. From there the build is orchestrated and kicks off, invoking your function to produce the final output.
This mechanism allows you to get a "static view" of the entire pipeline, which you can then visualize with Monocle, as you might have seen.
Depending on what your needs are, here are some solutions you might be able to use instead:
Tag the rows you're producing in your transform in some way, so that even though you put them into a single dataset, you can later select them by this tag/category
If your set of categories does not change often, you can instead create the output datasets ahead of time and then filter the rows into the appropriate dataset they should go into.
The main drawback with the latter approach is that it's not very dynamic, so if a new category shows up, you'll manually have to change the code to "triage" it into a new dataset, until the data becomes available.
There's other solutions (ultimately it is possible to make API calls and to manually adjust inputs/outputs as well, for instance) but they are more complex and undesirable from a maintenance perspective.
I have a Custom Synchronous Component that works fine and I use it.
Recently, I sent some Sorted data from a sort component to it (or an IsSorted=true Source Component)
but then i couldn't use the output as the input of a merge join due to not having a IsSorted=true property.
So I have to sort data again and it reduces the package performance too much.
Also I can't have any metadata same as Input, for my output(s) during design time.
I guess when my component is synchronous so it might be sorted as its input
if not, how to make the component output data sorted!
I really wanna know if there is any clever solution to solve this detailed issues about Custom Pipeline Components.
As your component is synchronous, somewhere in your code you are synchronizing the output, IDTSOutput1xx, with the input, IDTSInput1xx, with code like this:
output.SynchronousInputID = input.ID;
In a synchronous component the PipelineBuffer (the one exposed to the output, exposed in ProcessInput) is based upon the input buffer (usually with modified or added columns) respecting the original row ordering.
So, if you check that the input is ordered, you can assure that the output is also ordered. And there is a property that you can use to read this information from the input and set it in the output:
output.IsOrdered = input.IsOrdered
Take into account that you could set this property to true even if the output was not ordered, but in this case, you're relying on the information provided from the input, which should be correct.
You should only change this property explicitly to true in an asynchronous component in which you really sort the rows before returning them. But, as I told, you could lie, and set this property to true without returning ordered rows. In other words, it's informative metadata.
If this doesn't work for you, you'll also have to set the SortKeyPosition of the required columns in output.OutputColumnCollection. This information is also used by Merge Join to ensure that the input apart from being ordered, is ordered by the required columns.
If you want to see how you can do this using the SSIS task editor, instead of doing it "automagically" in your custom component, please, read IsSorted properties in SSIS or SSIS #98 – IsSorted is true, but sorted on what?
The Merge Join Transform in SSIS has a few requirements. To join two data sources,The data sources must be sorted and there must be a key that you can join them with. In some cases, I perform the join in the OLEDB SOURCE from Query.
I am new in utilizing deeplearning4j. I am running the paragraphvector classifier on a dataset including labeled and unlabeled data, and got a result. When I run it again on the same dataset using a same configuration, I will get another results! The new results is close to the previous one, but why it generates slightly different results?! What I mean by slighltly different results is like at the first run, it detects and assigns two testing samples to the first class we have, and in the second run, it assigns those two samples or probably one of them to another class. It happens normally for just one or two maybe three samples. Maybe I needed to inform you in advance that we have three classes that they are all related to cancer types diseases.
Any hint/help/advice would be highly appreciated.
I use such a below configuration:
paragraphVectors = new ParagraphVectors.Builder()
.learningRate(0.2)
.minLearningRate(0.001)
.windowSize(2)
.iterations(3)
.batchSize(500)
.workers(4)
.stopWords(stopWords())
.minWordFrequency(10)
.layerSize(100)
.epochs(1)
.iterate(iterator)
.trainWordVectors(true)
.tokenizerFactory(tokenizerFactory)
.build();
Problem turned out to be bad input with the tokenizer.
I've been working on designing an experiment in Psychopy, and I am running into some problems with the interaction between my conditions file and a text element. I am trying to get my conditions file (CSV format) to specify the position of two text elements (the variables are "NowPos" and "LaterPos"). In the CSV file, underneath the headers, I have two different coordinate pairings listed. In the "position [x,y]" field of the text element conditions, I have written "$NowPos" (or "$LaterPos", depending on the element). With this, I intend to direct PsychoPy to read the specified variable from my conditions file, which is placed in a loop outside of the routine that calls for the variables it contains. However, it appears that the code automatically compiled by PsychoPy is trying to define "NowPos" and "LaterPos" at the beginning of the program. Because of this, they are undefined at the time that PsychoPy asks for them, causing my code to fail.
Do you have any ideas for getting PsychoPy to look for the right conditions file immediately? Could I have formatted something incorrectly?
Next to the position field, you need to select an option like "Set every repeat", so that a new position value is accessed on every trial.
The problem you describe sounds like you have left it at the default setting of "Constant", in which case the value only needs to be set once, at the beginning of the experiment. At that stage, as you note, the loop hasn't been created, thus its variables haven't been defined, and aren't available to refer to.
I have three dropdown boxes on a Main_Form. I will add the chosen content into three fields on the form, Form_Applications.
These three lines are added :
Form_Applications.Classification = Form_Main_Form.Combo43.Value
Form_Applications.Countryname_Cluster = Form_Main_Form.Combo56.Value
Form_Applications.Application = Form_Main_Form.Combo64.Value
The first two work perfectly but the last one gives error code 438!
I can enter in the immediate window :
Form_Applications.Classification = "what ever"
Form_Applications.Countryname_Cluster = "what ever"
but not for the third line. Then, after enter, the Object doesn't support this property or method error appears.
I didn't expect this error as I do exactly the same as in the first two lines.
Can you please help or do you need more info ?
In VBA Application is a special word and should not be used to address fields.
FormName.Application will return an object that points to the application instance that is running that form as opposed to an object within that form.
From the Application object you can do all sorts of other things such as executing external programs and other application level stuff like saving files/
Rename your Application field to something else, perhaps ApplicationCombo and change your line of code to match the new name. After doing this the code should execute as you expect.
Form_Applications.Application is referring to the application itself. It is not a field, so therefore it is not assignable (at least with a string).
You really haven't provided enough code to draw any real conclusions though. But looking at what you have posted, you definitely need to rethink your approach.
It's to say definitely but you are not doing the same. It looks like you are reading a ComboBox value the same (I will assume Combo64 is the same as 43 and 56) but my guess is that what you are assigning that value to is the problem:
Form_Applications.Application =
Application is not assignable. Is there another field you meant to use there?