Commit 0bf219af authored by Marta Różańska's avatar Marta Różańska
Browse files

merge with main branch

parent 84e05452
......@@ -30,6 +30,7 @@ public class CPSolverController {
@RequestMapping(value = "/constraintProblemSolution", method = POST)
public void applySolution(@RequestBody ConstraintProblemSolutionRequestImpl request) {
log.info("LEDDDDSRERR");
String applicationId = request.getApplicationId();
String cdoResourcePath = request.getCdoModelsPath();
String notificationUri = request.getNotificationURI();
......@@ -43,6 +44,7 @@ public class CPSolverController {
@RequestMapping(value = "/constraintProblemSolutionFromFile", method = POST)
public void constraintProblemSolutionFromFile(@RequestBody ConstraintProblemSolutionFromFileRequestImpl request) throws Exception {
log.info("LESRERR");
String camelModelFilePath = request.getCamelModelFilePath();
String cpModelPath = request.getCpProblemFilePath();
String nodeCandidatesFilePath = request.getNodeCandidatesFilePath();
......
package cp_wrapper;
import cp_wrapper.parser.CPParsedData;
import cp_wrapper.parser.CPParser;
import cp_wrapper.utility_provider.UtilityProvider;
import cp_wrapper.utils.domain_handler.DomainHandler;
import cp_wrapper.utils.numeric_value.*;
import cp_wrapper.utils.numeric_value.implementations.DoubleValue;
import cp_wrapper.utils.variable_orderer.HeuristicVariableOrderer;
import cp_wrapper.utils.cp_variable.VariableNumericType;
import cp_wrapper.utils.variable_orderer.RandomVariableOrderer;
import cp_wrapper.utils.variable_orderer.VariableOrderer;
package eu.melodic.upperware.cp_wrapper;
import eu.melodic.upperware.cp_wrapper.parser.CPParsedData;
import eu.melodic.upperware.cp_wrapper.parser.CPParser;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.cp_wrapper.utils.cp_variable.VariableNumericType;
import eu.melodic.upperware.cp_wrapper.utils.domain_handler.DomainHandler;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.implementations.DoubleValue;
import eu.melodic.upperware.cp_wrapper.utils.variable_orderer.HeuristicVariableOrderer;
import eu.melodic.upperware.cp_wrapper.utils.variable_orderer.RandomVariableOrderer;
import eu.melodic.upperware.cp_wrapper.utils.variable_orderer.VariableOrderer;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableDTO;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTOFactory;
......
package cp_wrapper.parser;
package eu.melodic.upperware.cp_wrapper.parser;
/*
This class contains all data representing a specific constraint problem.
*/
import cp_wrapper.utils.constraint.Constraint;
import cp_wrapper.utils.constraint_graph.ConstraintGraph;
import cp_wrapper.utils.cp_variable.VariableNumericType;
import cp_wrapper.utils.numeric_value.NumericValueInterface;
//import eu.melodic.upperware.cpsolver.solver.parser.creator.*;
import eu.melodic.upperware.cp_wrapper.utils.constraint.Constraint;
import eu.melodic.upperware.cp_wrapper.utils.constraint_graph.ConstraintGraph;
import eu.melodic.upperware.cp_wrapper.utils.cp_variable.VariableNumericType;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.paasage.upperware.metamodel.cp.*;
import eu.paasage.upperware.metamodel.types.BasicTypeEnum;
import lombok.Getter;
......@@ -18,6 +16,8 @@ import java.util.stream.Collectors;
import static java.lang.String.format;
//import eu.melodic.upperware.cpsolver.solver.parser.creator.*;
public class CPParsedData {
private Collection<Constant> constants;
private Collection<CpMetric> metrics;
......
package cp_wrapper.parser;
package eu.melodic.upperware.cp_wrapper.parser;
/*
This class is responsible for transforming ConstraintProblem interface into
CPParser class. The only work that is done here is transforming ComparisonExpression interface
into less abstract ArConstraint instance.
*/
import cp_wrapper.utils.constraint.Constraint;
import cp_wrapper.utils.constraint.ConstraintImpl;
import eu.melodic.upperware.cp_wrapper.utils.constraint.Constraint;
import eu.melodic.upperware.cp_wrapper.utils.constraint.ConstraintImpl;
import eu.paasage.upperware.metamodel.cp.ConstraintProblem;
import java.util.List;
......
package cp_wrapper.solution;
package eu.melodic.upperware.cp_wrapper.solution;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
import lombok.AllArgsConstructor;
......
package cp_wrapper.utility_provider;
package eu.melodic.upperware.cp_wrapper.utility_provider;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
......
package cp_wrapper.utility_provider;
package eu.melodic.upperware.cp_wrapper.utility_provider;
public interface UtilityProviderFactory {
UtilityProvider create();
......
package cp_wrapper.utility_provider.implementations;
package eu.melodic.upperware.cp_wrapper.utility_provider.implementations;
import cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.utilitygenerator.UtilityGeneratorApplication;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
......
package cp_wrapper.utility_provider.implementations;
package eu.melodic.upperware.cp_wrapper.utility_provider.implementations;
import cp_wrapper.utility_provider.UtilityProvider;
import cp_wrapper.utility_provider.UtilityProviderFactory;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProviderFactory;
import eu.melodic.upperware.utilitygenerator.UtilityGeneratorApplication;
import java.util.List;
......
package cp_wrapper.utility_provider.implementations;
package eu.melodic.upperware.cp_wrapper.utility_provider.implementations;
import cp_wrapper.utility_provider.UtilityProvider;
import cp_wrapper.utility_provider.UtilityProviderFactory;
import eu.melodic.cache.NodeCandidates;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProviderFactory;
import eu.melodic.upperware.penaltycalculator.PenaltyFunctionProperties;
import eu.melodic.upperware.utilitygenerator.UtilityGeneratorApplication;
import eu.melodic.upperware.utilitygenerator.properties.UtilityGeneratorProperties;
......
package cp_wrapper.utility_provider.implementations;
package eu.melodic.upperware.cp_wrapper.utility_provider.implementations;
import cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.cp_wrapper.utility_provider.UtilityProvider;
import eu.melodic.upperware.utilitygenerator.UtilityGeneratorApplication;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
import lombok.AllArgsConstructor;
......
package cp_wrapper.utils.constraint;
package eu.melodic.upperware.cp_wrapper.utils.constraint;
import cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import java.util.Collection;
import java.util.Map;
......
package cp_wrapper.utils.constraint;
package eu.melodic.upperware.cp_wrapper.utils.constraint;
import cp_wrapper.utils.expression_evaluator.ExpressionEvaluator;
import cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.paasage.upperware.metamodel.cp.*;
import eu.melodic.upperware.cp_wrapper.utils.expression_evaluator.ExpressionEvaluator;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.paasage.upperware.metamodel.cp.ComparatorEnum;
import eu.paasage.upperware.metamodel.cp.ComposedExpression;
import eu.paasage.upperware.metamodel.cp.Expression;
import java.util.ArrayList;
import java.util.Collection;
......
package cp_wrapper.utils.constraint_graph;
package eu.melodic.upperware.cp_wrapper.utils.constraint_graph;
/*
This class implements constraint graph.
A constraint graph is created from a set of
......@@ -8,8 +8,8 @@ package cp_wrapper.utils.constraint_graph;
*/
import cp_wrapper.utils.constraint.Constraint;
import cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.melodic.upperware.cp_wrapper.utils.constraint.Constraint;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import java.util.*;
......
package cp_wrapper.utils.cp_variable;
package eu.melodic.upperware.cp_wrapper.utils.cp_variable;
import eu.melodic.upperware.utilitygenerator.cdo.cp_model.DTO.VariableValueDTO;
import eu.paasage.upperware.metamodel.cp.*;
......@@ -9,7 +9,6 @@ import lombok.extern.slf4j.Slf4j;
import java.util.List;
import static eu.passage.upperware.commons.model.tools.CPModelTool.*;
import static eu.passage.upperware.commons.model.tools.CPModelTool.createFloatValueUpperware;
@Slf4j
public class CpVariableCreator {
......
package cp_wrapper.utils.domain_handler;
package eu.melodic.upperware.cp_wrapper.utils.domain_handler;
/*
All variable domains are abstracted as finite sequences of subsequent
natural numbers - this class is responsible for turning those "domain indices"
into corresponding values. Currently only RangeDomain and NumericListDomain
domains are supported.
*/
import cp_wrapper.utils.expression_evaluator.ExpressionEvaluator;
import cp_wrapper.utils.numeric_value.NumericValueFactory;
import cp_wrapper.utils.numeric_value.implementations.IntegerValue;
import cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.melodic.upperware.cp_wrapper.utils.expression_evaluator.ExpressionEvaluator;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueFactory;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.implementations.IntegerValue;
import eu.paasage.upperware.metamodel.cp.Domain;
import eu.paasage.upperware.metamodel.cp.NumericListDomain;
import eu.paasage.upperware.metamodel.cp.RangeDomain;
......
package cp_wrapper.utils.expression_evaluator;
package eu.melodic.upperware.cp_wrapper.utils.expression_evaluator;
/*
This class is used to parse and evaluate Expression
interfaces from eu.paasage.upperware.metamodel.cp package
*/
import cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.paasage.upperware.metamodel.types.*;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.NumericValueInterface;
import eu.paasage.upperware.metamodel.cp.*;
import eu.paasage.upperware.metamodel.types.*;
import java.util.List;
import java.util.Map;
......
package cp_wrapper.utils.nc_json_parser;
package eu.melodic.upperware.cp_wrapper.utils.nc_json_parser;
import com.google.gson.Gson;
import eu.melodic.cache.CacheService;
......
package cp_wrapper.utils.numeric_value;
package eu.melodic.upperware.cp_wrapper.utils.numeric_value;
import cp_wrapper.utils.numeric_value.implementations.DoubleValue;
import cp_wrapper.utils.numeric_value.implementations.IntegerValue;
import cp_wrapper.utils.numeric_value.implementations.LongValue;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.implementations.DoubleValue;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.implementations.IntegerValue;
import eu.melodic.upperware.cp_wrapper.utils.numeric_value.implementations.LongValue;
import eu.paasage.upperware.metamodel.types.*;
public class NumericValueFactory {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment