/// <summary>
        /// Method called that defines the property schema for the step.
        /// </summary>
        public void DefineSchema(IPropertyDefinitions schema)
        {
            IPropertyDefinition pd;

            // Reference to the excel to write to
            pd = schema.AddElementProperty("ExcelConnectEPPlus", ExcelConnectEPPlusElementDefinition.MY_ID);

            // And a format specifier
            pd             = schema.AddStringProperty("Worksheet", String.Empty);
            pd.Description = "Worksheet Property";
            pd.Required    = true;

            pd             = schema.AddExpressionProperty("Row", "1");
            pd.Description = "Row Property";
            pd.Required    = true;

            pd             = schema.AddExpressionProperty("StartingColumn", "1");
            pd.DisplayName = "Starting Column";
            pd.Description = "Starting Column Property";
            pd.Required    = true;

            // A repeat group of values to write out
            IRepeatGroupPropertyDefinition parts = schema.AddRepeatGroupProperty("Items");

            parts.Description = "The expression items to be written out.";

            pd             = parts.PropertyDefinitions.AddExpressionProperty("Expression", String.Empty);
            pd.Description = "Expression value to be written out.";
        }
Exemple #2
0
        /// <summary>
        /// Method called that defines the property schema for the step.
        /// </summary>
        public void DefineSchema(IPropertyDefinitions schema)
        {
            IPropertyDefinition pd;

            // Reference to the file to read from
            pd = schema.AddElementProperty("ExcelConnectEPPlus", ExcelConnectEPPlusElementDefinition.MY_ID);

            pd             = schema.AddStringProperty("Worksheet", String.Empty);
            pd.Description = "Worksheet Property";
            pd.Required    = true;

            pd             = schema.AddExpressionProperty("Row", "1");
            pd.Description = "Row Property";
            pd.Required    = true;

            pd             = schema.AddExpressionProperty("StartingColumn", "1");
            pd.DisplayName = "Starting Column";
            pd.Description = "Column Property";
            pd.Required    = true;

            // A repeat group of states to read into
            IRepeatGroupPropertyDefinition parts = schema.AddRepeatGroupProperty("States");

            parts.Description = "The state values to read the values into";

            pd             = parts.PropertyDefinitions.AddStateProperty("State");
            pd.Description = "A state to read a value into from Excel.";
        }
        /// <summary>
        /// Method called that defines the property, state, and event schema for the element.
        /// </summary>
        public void DefineSchema(IElementSchema schema)
        {
            IPropertyDefinitions _propDefs = schema.PropertyDefinitions;

            IPropertyDefinition pd;

            pd             = _propDefs.AddStateProperty(MyStrings.TableIndexName);
            pd.Description = "References the State Property used to select the SimioTable row";
            pd.Required    = false;

            pd             = _propDefs.AddExpressionProperty(MyStrings.TableRowCountName, "0");
            pd.Description = "An Expression containing # of rows in the SimioTable";
            pd.Required    = false;

            // A repeat group of states to read into
            IRepeatGroupPropertyDefinition columns = _propDefs.AddRepeatGroupProperty(MyStrings.TableColumnMappingsName);

            columns.Description = "The RepeatGroup mapping expressions to the Table columns";

            pd             = columns.PropertyDefinitions.AddStringProperty(MyStrings.ColumnMapNameName, "");
            pd.Description = "Column Name Map";

            pd             = columns.PropertyDefinitions.AddStateProperty(MyStrings.ColumnMapStateName);
            pd.Description = "Set if the column is a State";

            pd             = columns.PropertyDefinitions.AddExpressionProperty(MyStrings.ColumnMapExpressionName, "");
            pd.Description = "Set if the column is an Expression";

            pd             = columns.PropertyDefinitions.AddExpressionProperty(MyStrings.ColumnMapPropertyName, "");
            pd.Description = "Set if the column is a Property";
        }
        /// <summary>
        /// Method called that defines the property schema for the step.
        /// </summary>
        public void DefineSchema(IPropertyDefinitions schema)
        {
            IPropertyDefinition pd;

            // A repeat group of states to read into
            IRepeatGroupPropertyDefinition fields = schema.AddRepeatGroupProperty("MyMappedFields");

            fields.Description = "The RepeatGroup that will reference a Simio Table";

            pd             = fields.PropertyDefinitions.AddStateProperty("StateField1");
            pd.Description = "A state/field to map into RepeatingGroup";

            pd             = fields.PropertyDefinitions.AddStateProperty("StateField2");
            pd.Description = "A state/field to map into RepeatingGroup";

            pd             = fields.PropertyDefinitions.AddStateProperty("StateField3");
            pd.Description = "A state/field to map into RepeatingGroup";

            pd             = fields.PropertyDefinitions.AddStateProperty("StateField4");
            pd.Description = "A state/field to map into RepeatingGroup";

            pd             = fields.PropertyDefinitions.AddRealProperty("PropertyField1", 9.9);
            pd.Description = "A property/field to map into RepeatingGroup";

            //pd = fields.PropertyDefinitions.AddExpressionProperty("PropertyField1", "Table1.MyRealProp1");
            //pd.Description = "A property/field to map into RepeatingGroup";
        }
        /// <summary>
        /// Method called that defines the property schema for the step.
        /// </summary>
        public void DefineSchema(IPropertyDefinitions schema)
        {
            try
            {
                // Example of how to add a property definition to the step.
                IPropertyDefinition pd;
                pd             = schema.AddStringProperty("ExecutableLocation", "");
                pd.DisplayName = "Executable Location";
                pd.Description = "The full path to the executable program (.exe)";
                pd.Required    = true;



                // A repeat group of columns and expression where the data will be written
                IRepeatGroupPropertyDefinition arguments = schema.AddRepeatGroupProperty("Arguments");
                arguments.Description = "The arguments for the executable. See Argument Logic for options";
                pd             = arguments.PropertyDefinitions.AddExpressionProperty("ArgumentName", String.Empty);
                pd.Description = "The name of the argument";
                pd             = arguments.PropertyDefinitions.AddExpressionProperty("Expression", String.Empty);
                pd.Description = "The Simio expression that will assigned to the argument.";

                pd             = schema.AddBooleanProperty("WaitForExecutableToExit");
                pd.DisplayName = "Wait For Exit";
                pd.Description = "If true, then Step will wait in the Step until the executable completes its run";
                pd.Required    = true;
                pd.SetDefaultString(schema, "False");

                IBooleanPropertyDefinition bpd = schema.AddBooleanProperty("CreateWindow");
                bpd.DisplayName = "Create Window";
                bpd.Description = "If True, the executable will appear in a new window. Useful for debugging";
                bpd.Required    = true;
                bpd.SetDefaultString(schema, "True");

                IEnumPropertyDefinition epd = schema.AddEnumProperty("ArgumentLogic", typeof(EnumArgLogic));
                epd.Description = "Logic that describes how the Simio Arguments are created";
                epd.SetDefaultString(schema, "None");
                epd.Required = true;

                // Example of how to add a property definition to the step.
                pd             = schema.AddStringProperty("Delimiter", "");
                pd.DisplayName = "Delimiter";
                pd.Description = "The delimiter to use around each argument when calling the executable";
                pd.Required    = true;

                bpd             = schema.AddBooleanProperty("UseShellExecute");
                bpd.DisplayName = "Use Shell Execute";
                bpd.Description = "If True, the executable will be run within a Windows Shell.";
                bpd.Required    = true;
                bpd.SetDefaultString(schema, "True");
            }
            catch (Exception ex)
            {
                throw new ApplicationException($"Error creating RunExecutables Schema. Err={ex.Message}");
            }
        }
Exemple #6
0
        /// <summary>
        /// Method called that defines the property schema for the step.
        /// </summary>
        public void DefineSchema(IPropertyDefinitions schema)
        {
            var pd = schema.AddElementProperty("AgentConnection", AgentConnectionDefinition.MY_ID);

            pd.DisplayName = "Agent Connection";
            pd.Description = "An agent connection object.";
            pd.Required    = true;


            pd             = schema.AddStateProperty("EpisodeNumber");
            pd.DisplayName = "Episode Number";
            pd.Description = "The number of the episode the agent is currently in";
            pd.Required    = true;

            pd             = schema.AddStateProperty("Status");
            pd.DisplayName = "Agent Status";
            pd.Description = "0: Ongoing, 1: Failure, 2: Success";
            pd.Required    = true;

            pd             = schema.AddStateProperty("Reward");
            pd.DisplayName = "Reward";
            pd.Description = "The reward given to the agent as a consequence of the last action taken";
            pd.Required    = true;

            pd             = schema.AddStateProperty("Action");
            pd.DisplayName = "Action";
            pd.Description = "The actions received from the agent";
            pd.Required    = true;

            IRepeatGroupPropertyDefinition parts = schema.AddRepeatGroupProperty("States");

            parts.DisplayName = "States";
            parts.Description = "The states that will be given to the agent";
            parts.Required    = true;
            pd             = parts.PropertyDefinitions.AddStateProperty("State");
            pd.Description = "State";
        }