Exemplo n.º 1
0
 /// <summary>
 /// Is loading the dataModel and preparing the component's functionality
 /// </summary>
 public void initialize()
 {
     try
     {
         CompetenceComponentFunctionality.Initialize();
         isInitialized = true;
     }
     catch (DataModelNotFoundException e)
     {
         CompetenceComponentFunctionality.loggingCC("Can't proceed - data model can not be loaded. File can not be found!");
     }
 }
Exemplo n.º 2
0
        public void setCompetenceValues(string competenceId, float learningValue, float assessmentValue)
        {
            if (!isInitialized)
            {
                initialize();
            }

            if (!isInitialized)
            {
                return;
            }

            CompetenceComponentFunctionality.setCompetenceValues(competenceId, learningValue, assessmentValue);
        }
Exemplo n.º 3
0
        public void resetCompetenceState()
        {
            if (!isInitialized)
            {
                initialize();
            }

            if (!isInitialized)
            {
                return;
            }

            CompetenceComponentFunctionality.resetCompetenceState();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Returns the competence id and its competence values in a dictionary.
        /// </summary>
        /// <returns>
        /// float[0]=learning value
        /// float[1]=assessment value
        /// </returns>
        public Dictionary <string, float[]> getCompetenceValues()
        {
            if (!isInitialized)
            {
                initialize();
            }

            if (!isInitialized)
            {
                return(null);
            }

            CompetenceComponentFunctionality.updateDueToForgetting();
            return(CompetenceComponentFunctionality.getCompetenceValues());
        }
Exemplo n.º 5
0
        /// <summary>
        /// Request the string id of the next gamesituation to test/train
        /// </summary>
        /// <returns> the string id of the gamesituation to train/test</returns>
        public List <string> getGamesituationRecommendation(int quantity = 1)
        {
            if (!isInitialized)
            {
                initialize();
            }

            if (!isInitialized)
            {
                return(null);
            }

            CompetenceComponentFunctionality.updateDueToForgetting();
            return(CompetenceComponentFunctionality.GetGamesituationRecommendation(quantity));
        }
Exemplo n.º 6
0
        /// <summary>
        /// Request the string id of the next competence to test/train
        /// </summary>
        /// <returns> the string id of the competence to train/test</returns>
        private string getCompetenceRecommendation(UpdateType type)
        {
            if (!isInitialized)
            {
                initialize();
            }

            if (!isInitialized)
            {
                return(null);
            }

            CompetenceComponentFunctionality.updateDueToForgetting();
            return(CompetenceComponentFunctionality.GetCompetenceRecommendation(type));
        }
Exemplo n.º 7
0
        /// <summary>
        /// Method for updating a single competence
        /// </summary>
        /// <param name="competence">string id of the competence for the update</param>
        /// <param name="success">true if the competence is upgraded, false if it is downgraded</param>
        private void updateCompetence(string competence, bool success, UpdateType type)
        {
            if (!isInitialized)
            {
                initialize();
            }


            if (!isInitialized)
            {
                return;
            }

            CompetenceComponentFunctionality.updateDueToForgetting();
            CompetenceComponentFunctionality.UpdateCompetence(competence, success, type);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Method for updating a single game situation
        /// </summary>
        /// <param name="gamesituation">string id of the gamesituation for the update</param>
        /// <param name="success">true if the competence is upgraded, false if it is downgraded</param>
        public GamesituationUpdateDescription updateGamesituation(string gamesituation, bool success, float quality = 1.0f)
        {
            if (quality < 0 || quality > 1)
            {
                throw new Exception("Quality values for game situation updtae need to be between and including 0 and 1.");
            }

            if (!isInitialized)
            {
                initialize();
            }


            if (!isInitialized)
            {
                return(null);
            }

            CompetenceComponentFunctionality.updateDueToForgetting();
            return(CompetenceComponentFunctionality.UpdateGamesituation(gamesituation, success, quality));
        }
Exemplo n.º 9
0
 public CompetenceAssessmentObject getAssessmentObject()
 {
     return(CompetenceComponentFunctionality.getAssessmentObject());
 }
Exemplo n.º 10
0
 public DataModel getDataModel()
 {
     return(CompetenceComponentFunctionality.loadDefaultDataModel());
 }