Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

RESEARCH AND FEASIBILITY ASSESSMENT OF CONSTRAINT MODELLING FOR USE IN THE CONTINUOUS

SIMULATION OF A BICYCLE
S EAN R OBINSON

Abstract Constraint modelling is the way in which mathematics can be applied to simulated objects in order to model them accurately in a virtual world. By applying constraints, a hierarchy of objects is held together and will move with each other in an appropriate way. This paper will explore the method behind this modelling and discuss its suitability for application within a time constrained situation, where the objective is continuous simulation. The output of this paper will be used to determine what method, if any, should be used in this condition. This paper will focus on the specialised Constraint Programming method of constraint modelling.

(1). These subsets become increasingly smaller as more constraints are added. Once all constraints are included, then the subset contains potential solutions for the problem that satisfies all criteria specified and the most appropriate can be chosen by the designer for use within the system. These constraints can be anything from simple observations such as comparing a timescale with minimum achievement or can be more complex. A basic example of a technical constraint within a system could be that when building a house, the walls should be perpendicular to the floor. More constraints can then be attached to the subset, such as the four walls must link together and form a cube (2). A constraint that is more appropriate to this instance is that when modelling a compound of rigid bodies, the angles between the individual components must lie within a certain range. When a subset has been built and there exists no solutions, it is the designers charge to decide which of the constraints may be relaxed or removed. Should there exist no candidates, then an alternative method should be considered.

CONTENTS
1. 2. 3. 4. 5. 6. Introduction .................................................. 1 Constraints .................................................... 1 Constraint Satisfaction Problems .................. 2 Constraint Programming ............................... 2 Bicycle Constraints ........................................ 3 Conclusions ................................................... 4

Bibliography ........................................................... 4

2. CONSTRAINTS 1. INTRODUCTION
Constraint modelling was first developed after studies of the engineering design process were undertaken and a solution was required that covered a variety of subsets that govern feasible designs (1). Constraint modelling is the way in which conditions are specified that must be true within a design. Each set of constraints for a particular item forms a subset of possible solutions In order to generate solutions, constraints must first be identified. This can be a difficult proposition as there is only a general guideline to consider when developing constraints. As mentioned, these can be relaxed heuristics or implicit declarations that must be conformed to. There are many variations of constraints, each with individual and collective properties. Properties to consider could be whether a variable

Page 1 of 4

Sean Robinson 2011

value is known in advance, how relationships are added together, if constraints share variables or what variables a relationship owns. When considering constraints appropriate to a solution, the type of constraint most applicable to a solution should also be considered. Types such as Boolean, linear or equality checks form a basic subset of types; to which arithmetic can be added for more complex relationships. Ceberio, M considers the arithmetic subset to consist of types such as integer and real intervals, real sets and finite integer domains. (3).

mapping a solution to it and then completing the mathematics are the most time consuming areas of modelling. Once they are completed, the task is to translate that solution into code. A common example of constraint programming is the map colouring problem. The MCP is where there is an area divided into separate pieces by boundary lines. The goal is to colour so that none of the neighbours have the same colour. A typical start state is illustrated below.

3. CONSTRAINT SATISFACTION PROBLEMS


CSP is a method in which a set of variables is defined, so that each represents a constraint to be modelled. Each variable has a subset of possible values that they can hold. In addition to the potential values (range), constraints are given to control which range is acceptable (4). There are several steps that need to be considered for each solution, these steps will define what sort of solution is required. It may be the case that a problem only requires that there exists a solution, others may require an optimal or several optimal solutions. Certain cases may test the solution for a given value of good; others may require that every solution to the given problem is found. We can categorise CSPs into the broad terms of integer, real, Boolean and symbolic; these specify the type domains that the variables range over. A useful way of modelling CSP is through the use of a constraint graph. A constraint graph uses a set of variables and their domains to show how the constraints applied generate and modify relationships between them (5).

C E

In this example, the different sections represent variables in the system, each of these systems will also have a set of values they can take called the domain. The domain can be almost anything, but a colour type will be used here for simplicity. With this data set, constraints need to be applied so that a desired outcome is achieved. This data can be synopsised as: Variables = {A, B, C, D, E} Domain = {Red, Blue, Yellow, Green} Constraints: A!=B, A!=C, A!=D B!=C, B!=E C!=D, C!=E D!=E This data can then be processed in whichever way is most appropriate to the situation. This can be either: purely mathematical, modelled in mathematical software or even programmed.

4. CONSTRAINT PROGRAMMING
With a set of rules that apply generally and specific rules for individual components of a model, it becomes apparent that when solved, constraint modelling transfers quite well onto a computer environment. The decomposition of a problem,

Page 2 of 4

Sean Robinson 2011

Whichever method is used, the outcome will be a list of solutions that conform to the constraints. One example is below.

head tube and front brake can be thought of as a single object when rotation around the Y axis due to steering is considered. Each object within this variable also owns its own set of variables.

5. BICYCLE CONSTRAINTS
A bicycle can be considered in many different ways; from the basic rigid body, to a complete decomposition of parts. When each part is specified separately, a much more complex picture is observed. Not only does each part need to have its own degree of movement, they must connect with each other in an appropriate manner and maintain that stable relationship throughout the simulation. When there are complex relationships between parts, a further complication arises; how to model compound parts within the object, this aggregation of parts becomes recursive as compounds link with other compounds and parts within those compounds link within parts inside its compound and those in other compounds. Now the bicycle has become a highly technical and delicately balanced object that must maintain many relationships with many variables and each with many domains and domain subsets. A more appropriate example than the MCP would be that of a steering shaft that governs the handlebars on a bicycle. The entire front of the bike; handlebars, front wheel, front suspension,

Imagine the image above a top down view of a set of handlebars on a bicycle. The striped oval represents the wheel, the purple bar is the handlebars and the green circles are the front shock absorbers attached to the fork. While this object is made up of several components, it can also be considered a single object that rotation must be applied to when steering. When modelling the steering it is important to consider how much of a turning degree is going to be used. Constraints can be used to specify this. Variables = {Bicycle_Front_Steering} Domain = {0..360} Constraints: Bicycle_Front_Steering < 45 Bicycle_Front_Steering > 315 This set of rules governs how far the steering is able to turn in both directions along the Y axis. A set of rules like this one will need to be developed for each individual component and also every compound that is used within the model. Other basic constraints to consider are shock absorber compression value, brake application value, pedal turning speed and wheel turning speed. A second compound that would also need attention would the entire object without the wheels as the movement along the Y axis front the shock absorbers would affect the entire frame but not the wheels in a basic example. In a real world

Page 3 of 4

Sean Robinson 2011

situation, the wheels would also be pressed into the ground as the suspension compresses.

BIBLIOGRAPHY
1. Hicks BJ, Medland AJMG. The Representation and handling of Constraints for the Design, Analysis and Optimization of High Speed Machinery. Artificial Intelligence for Engineering Design, Analysis and Manufacture (AIEDAM). 2006;(20): p. 313-328. 2. Brenner C. Constraints for Modelling Complex Objects. ISPRS Journal of Photogrammetry and Remote Sensing. 2005 August; XXXVI(3/W24). M. www.constraintsolving.com. 3. Ceberio [Online].; 2010 [cited 2011 11 05. Available from: http://www.constraintsolving.com/tutorials/cptutorial. University. 4. Berkeley http://aima.cs.berkeley.edu. [Online]. [cited 2011 11 05. Available from: http://aima.cs.berkeley.edu/newchap05.pdf. 5. Rossi F, Beek PV, Walsh T. Handbook of Constraint Programming. 1st ed.: Elsevier Science; 2006.

6. CONCLUSIONS
This paper has introduced Constraint Modelling, shown how to specify constraints and explained the different types available. The method of utilising constraints for specific solutions has been discussed. Constraint Programming has been the focus of this paper and it has become apparent how models can be mapped to a computer and then solved once the initial setup has been completed. The difficulty in utilising constraint programming for a bicycle simulator is that it is difficult to know how far to decompose a particular problem. Considering a bicycle as component parts and compounds of components makes the output significantly more complex and difficult to achieve. It is the findings of this paper that while component and compound constraint modelling is a very attractive method of creating a well simulated object, it is beyond the scope of small scale projects and should remain confined to the larger systems that span longer time frames and utilise significant resources. By devoting huge blocks of time and resources to highly complex modelling features, the core components of a project will suffer. The solution is to specify that a project will utilise a more basic model such as a rigid body, complete it to satisfaction and then begin work on improvement. Should no time remain then the initial research and development ideas can be documented for future users to explore. A concession within this realm is that of simplistic constraints such as those governing the turning degree of the steering compound or limits to revolutions of the wheels and pedals. These are simple tests against an objects relative position or movement and take very little computational and development time.

Page 4 of 4

Sean Robinson 2011

You might also like