Mathematical Modelling

Mathematical Modelling

  • Andrew Ford added an answer:
    Any suggestions on this formulation for resource allocation?

    General idea: Lets say there's a finite supply (S) of resources which should be allocated to two tasks based on their demands, D1 and D2.

    If Supply is larger than total demand (D), each task simply gets whatever it demands for:

    If S=1000 and D=400 (D1=100, D2=300)

    Then 100 units are assigned to task one (let's call it utilization 1, so U1=100) and 300 units to task two (U2=300) and the remaining 600 units are unused.

    However, S is often less than D. In that case, each task receives a proportion of S, such as:

    S=500 and D=1000 (D1=200, D2=800)
    Then: U1=D1/D*S and U2=D2/D*S

    To make sure that the tasks do not receive more than what they demand for:

    U1=min(D1, D1/D2*S) and U2=min(D2, D2/D*S)

    And let's call this as the base case.

    Problem: I'd like to compare this simple allocation to a a more general allocation formulation that changes the priority of allocation based on α (a continuum that can vary between 0 and 1).

    α=0 represents full priority to task one (so only resources remaining after meeting the demand for task one is spent on task two) and α=1 represents full priority to task two, and the base case results are obtained for α=0.5. To be more specific, here is an example:

    D1=100, D2=900, and S=200

    Three scenarios:

    α=0: Full priority to task one
    So, U1=100, then S-U1 goes to task 2, so U2=100

    α=0.5: Base case
    So, U1=20 and U2=180

    α=1: Full priority to task two
    So, U2=200 and nothing is left for task one, so U1=0

    I'd like to formulate this (calculation of U1 and U2) without IF THEN ELSE and lots of Min and Max, just with mathematical equation(s). I already have something which may be too complex so I would like to see what others think of this formulation.


    Andrew Ford

    I like Mohammad Jalali's question about resource allocation, especially his desire to avoid the IF THEN ELSE function and to avoid the use of a MAX or a MIN function.   Perhaps his resource allocation question is comparable to a discrete choice situation, as when consumers allocate their resources to buy one type of vehicle or another.  If so, the "multinomial logit model" might be useful.  This model has been put to good use in simulating market shares, with some calling it the "workhorse" of discrete choice models.   An example of the multinominal logit appied to the choice of different vehicle types (electric vehicles, conventional vehicles, etc) is described on pages 213-216 of my text on MODELING THE ENVIRONMENT (Island Press 2010). 

  • Diego Fasoli added an answer:
    What is the difference between critical and non-critical transitions?

    I know that critical transitions occur at catastrophic bifurcations, namely abrupt changes in the qualitative behavior of a system that occur at specific thresholds in external conditions. Catastrophic bifurcations arise in systems with alternative stable states (or, in general, alternative attractors).

    So for example, a saddle-node bifurcation is catastrophic. Also subcritical Hopf bifurcations are catastrophic, therefore I think they should give rise to critical transitions.

    Supercritical pitchfork and Hopf bifurcations are noncatastrophic, therefore I think they should be related to non-critical transitions. Nevetheless, in some articles the authors say that critical transitions occur also at supercritical Hopf bifurcations. Why? Are they wrong? Is there something I do not understand?

    Many thanks in advance for your help!

    Diego Fasoli

    Dear Dr Mira, I thank you very much for this nice historical explanation. If I understand it correctly, dangerous/safe stability boundaries should be synonyms of catastrophic/non-catastrophic bifurcations. Well, I think it is a very good idea to read carefully the chapter you suggested.

    Best regards,


  • Waldemar Koczkodaj added an answer:
    I m experiencing problems in plotting vector lines from origin in PCA analysis. How vector biplots can be plotted in PCA analysis using XLSTAT?

    Vector biplots for PCA. 

    Waldemar Koczkodaj

    gnuplot is for plotting...

    how you get results is your bsn

    gnuplot is a part of MANY MANY system including gnumeric and Maxima

    There are also many GUI for gnuplot

    For PCA analysis, the best is R system which uses gnuplot2 (variation).

    For R system (has a package with my name), you use RStudio or similar GUI (without it, it is useless).

    You may contact me if you nail R+Rstudio :) and I can give you something leading to a publication (if not, good luck :). Same goes for anybody else.

    Pls upvote if useful...

  • Jean-Charles Régin added an answer:
    Which programming languages/systems are the constraint programming community using these days?
    As you know, constraint programming is build into several languages, notably several languages in the Prolog family, but there are also others (I have been using Oz for many years). These languages are particular "high-level" (e.g., programming paradigms with high degree of abstraction), which is great for modelling CSP at a high level. On the other hand, these languages are not mainstream: they have their communities, tools etc., but compared with mainstream languages their programming environments are lacking in various ways.

    In addition, there are several libraries that add constraint programming support. Often these are C or C++ libraries, others are for Java etc . Such mainstream languages have huge communities, which greatly helps their development tools and libraries. Languages close to the metal can also be suitable for optimising search in CP. For the modelling of complex CSP however, such "low-level" languages add a certain overhead.

    For my purposes (focus on modelling of complex CSPs) I would ideally like some mainstream language that is at the same time rather high level. So, I am currently looking at the constraint programming libraries for Python.

    Anyway -- which programming systems are you using and why?
    Jean-Charles Régin

    Constraint programming solvers are made available thanks to library. There is a difference between the language in which there are written and the API of the library. You should consider more the API than the programming language. So this is a matter of taste. For instance I don't like minizinc but this just a personal opinion. If you are mainly focused on the modeling part of the problem then try to use an API which is simple. You could use or-tools in this case or Oscar (solver based on Scala). If you want to play with low level functions of a CP solver then you can use another solver which give you the possibility to interact with low level features like choco or Gecode. Gecode is fast but it is also complex sometimes (and easy to use for some other aspects). Try to have a look at the API and use only API stuff;

  • Babak Hosseini added an answer:
    What is the solution to this specific type of Lasso optimization problem?

    I have the following optimization problem to solve:

    Min{c} ||A-B*c*x||2+lambda*norm1(c)

      s.t  c>=0

    A and B are matrices while c and x are column-vector and row-vector respectively. This is a variation of the well-known Lasso problem, however in this case c is trapped between B and x.

    Anyone has any idea on how to mathematically solve/approach the about problem?

    Babak Hosseini

    Dear Dario, 

    such a nice trick! i like it! i think i can combine the above tick with one of available solutions to the typical constrained lasso problem. Thank you very much.

  • Jawad Masood asked a question:
    What is harmonic drive elastic wind up effect?

    I am looking for mathematical model of such behavior of HD. I am particularly interested in back drivability and elastic wind up effect relation. Thanks!!!

  • Titus Sobisch added an answer:
    How can we find the packing density of the mix from individual particle packing density?

    Hi, I am looking for a mathematical formula for calculating the packing density of mixed powder and 3 granular material from maximum measured packing density of each.  

    Titus Sobisch

    You should be clear that even it is possible to calculate by simple arithmetic mean likely the real packing density will differ maybe to larger extent, e.g. due to smaller particles filling the voids of larger ones and also by particle interactions. If you assume no interaction you may be better of knowing the size distributions of the 3 materials.

  • Vladimir Rasvan added an answer:
    Can you provide me / advice me with Modelling and analysis case studies ?

    I am looking for a case studies around Modeling and analysis to do feedback study

    Appreciate your feedback

    Vladimir Rasvan

    Read the book "Modeling and Analysis of Dynamic Systems" by R.S. Esfandiari and Bei Lu, published by CRC Press. The second edition contains more about using MATLAb-sIMULINK with worked examples

  • Manuel Duarte Ortigueira added an answer:
    What are some examples of experimental investigations of fractional order dynamical systems?

    How much experimental work has been done on fractional dynamical systems? I recall hearing of some electronic oscillators that are modeled by fractional equations. In that case, the circuits were expressly designed to fit the equations. Are there any examples that are less contrived?

    Manuel Duarte Ortigueira

    See the papers of Duarte Valério, Richard Magin, or Tenreiro Machado. See my paper in attach

    • [Show abstract] [Hide abstract]
      ABSTRACT: The fractional model of the electrochemical capacitor (EC) and its potential relaxation are presented. The potential relaxation occurs after charge or discharge current interruption. The EC fractional model is based on the fractional order transfer function that was obtained by means of least squares fitting of the EC impedance data. The inverse Laplace transform is used to obtain the EC impulse response. By using of the EC impulse response the EC charge and discharge simulation were performed.
      No preview · Article · Dec 2014 · Signal Processing
  • Roberto Suárez-Ántola added an answer:
    Does anyone know what the "S" in the S-procedure stands for?

    Hi All

    After reading a couple of surveys in the method, I have not been able to find any comment about its name. 

    Best regards,


    Update: From a similar discussion in Mathoverflow, it seems that it comes from Aizerman and Gantmacher's book, where the use S in equation (12). Any reason to use S in the name of this function?

    Roberto Suárez-Ántola

     It seems that there is no particular reason to use S as the name of the method in English.

  • Gennaro Vitucci added an answer:
    Why we study qualitative behavior of differential equations?

    In differential equation, there are two types of solutions that is, quantitative solution and qualitative solution.

    1. What is quantitative solution of DE?

    2. What is qualitative solution of DE?

    3. Why we mostly give important to qualitative study of DE?

    4. What are the drawbacks of quantitative solution of DE?

    5. What are the types of qualitative solution of DE?

    Gennaro Vitucci

    All that was said up to now is right,

    I'd just like to put my 2 cents in: since a big number of DEs are nowadays solved analytically by asymptotics, knowing the behaviour of the solution in certain ranges may provide very close approximation also for quantitative solutions.

    All the best,


  • E. B. Sibiryakov added an answer:
    Which quadrature rule can be used in 3D BEM to evaluate hypersingular (1/r^2) Hadamard integrals?

    I am developing a 3D boundary element code for problems of elastostatics. This is not the focus of my research, I just need it as an instrument. I look  for a simple way of numerical evaluation of Hadamard finite part integrals, that occur in 3D fundamental solutions for tractions. These can be either evaluated on a triangular element or boiled down to 1D integrals of a kind: Integral from 0 to 1 f(x) dx / x^2. Papers on the topic that I've found seem to be messy and contradictory, nobody gives Gauss-like quadrature with points and weights. Any help is greatly appreciated. Thanks!  

    E. B. Sibiryakov

    The best way is to change kernels. If you will use as kernels fundamental solution for the half-space (properly orientated), all singularities have to be integratable.

  • Ridha Djebali added an answer:
    Is it possible to solve a k-e turbulant model in comsol?

    Hi everyone! I need to numerically investigate turbulent regime of natural convection in closed rectangular area. So is it possible to solve k-e turbulence model of natural convection in a closed area in conjugate formulation in comsol? Or should I solve "manually" another turbulent model, which will be easier than k-e?

    Ridha Djebali

    I say it is possible,I've tried it for a problem of fire in tunnel for Grashof number > 1e9. but it is hard to handle mesh where high fields gradients in comparison with fluent.

  • Daniel C Elton added an answer:
    Why are physicists stuck with Fortran and not willing to move to Python with NumPy and Scipy?

    Nowadays all of the major Fortran related numerical calculus have exactly mapped equivalent libraries in more modern language framework like Numerical Python (NumPy) and Scientific Python (SciPy). 

    What keeps physicists stuck with Fortran?



    Scientific evidence?

    + 1 more attachment

    Daniel C Elton

    It really depends what the students are doing. 

    If they are analyzing a small data set and looking to make some plots, obviously python will be faster to code and easier to use. 

    However, for any serious simulation or numerical computation, Fortan will be many times faster. Also, if you want to parallelize your code (for clusters or GPUs) it is very difficult to do that with Python. Parallelization really can give a research group an edge and is becoming more and more popular. 

    I'd also argue that for many things Fortran is easier to learn than C and even Python. The programming model that Fortran uses is much easier to learn than the Object oriented model that Python is built around. If you wish to go object oriented, you can use Fortran 2003, but you don't have to learn it from the outset. 

    Fortran offers a nice mix of ease of use for numerical calculation and raw speed which is so far unmatched.

    The fact that physicists still use Fortran is more of an indictment of the computer science community than of physicists. The fact is, they have not yet developed a better alternative that combines speed and ease of use. The closest thing is the Julia language which is currently being developed. 

    I have written about this in much more detail on my blog (see attached link). 

  • Peter Stephen Donelan added an answer:
    Can anyone give a simpler explanation on the eigenvalues of a stiffness matrix?

    Henri P. Gavin ("Mathematical Properties of Stiffness Matrices") gave some information about eigenvalues of stiffness matrices. ""

    I need a simpler explanation. Consider a scenario of two surfaces in contact (not rigid contact, but unglued close-fit).

    If the eigenvalues of 6 x 6 stiffness matrix resulting from this model are 100, 1200, 1250, 1300, 1320, 1330,

    1. What does these values mean?

    2. How can I locate the points of applications of each of these eigenvalues on the model?

    3. What would be their influence on the model? 

    4. What would be the influence of a change in any of the values of the eigenvalues on the model?

    Peter Stephen Donelan

    Hi Samuel,  In the context of stiffness matrices, the eigenvectors are called "principal screws", an idea introduced by Robert Ball in his treatise on screws.  The stiffness matrix maps infinitesimal motions - combining translation and rotation of a rigid body, called twists - to generalised forces (force + torque) or wrenches acting on it. Wrenches are dual to twists.  The principal screws, similar to the way that eigenvectors of distinct eigenvalues for any symmetric matrix are orthogonal, are mutually "reciprocal", that is (s_j)^T Q_0 (s_i) = 0. Here Q_0 is the Klein form on the space of twists.  This is an indefinite form so it is possible for twists to be self-reciprocal.  

    In your example, there is one principal screw where the wrench induced by the corresponding twist is smaller in magnitude than for the others and this will be a minimum response for the system.  

    You can find out more in Jon Selig's papers such as


  • Eliza Wajch added an answer:
    Can a Cantor cube be simultaneously metrizable and non-compact in a model for ZF?

    It is known to me that, in some models for ZF, for an uncountable set $J$, the Cantor cube {0,1}^J can be metrizable. Unfortunately, I still do not know whether there is a model for ZF in which, for some uncountable set $J$ the Cantor cube {0,1}^J is simultaneously non-compact and metrizable. Perhaps, there are mathematicians in the world who know. I would be grateful to them for useful hints. 

    Eliza Wajch

    Now, I am sure that, in every model for ZF+the negation of CC(fin),  if a Cantor cube is simultaneously metrizable and not second-countable, then it is not compact, This happens for every Cantor cube  ${0,1}^J$ such that $J$ is an uncountable set which is a countable union of finite sets. 

    With my best wishes for a happy New Year to you all! Eliza

  • Wilfried Musterle added an answer:
    Is it possible to reproduce a melody with an artificial neural network?
    The temporal information of a melody has to be "stored" in weights connecting neurons.
    Wilfried Musterle

    Dear all,

    Merry Christmas to you and a happy new year.

  • Marina Zharikova added an answer:
    What fire dynamic model is the most convenient for programming?

    Let me describe my task in short.

    I've created the electronic map of forestry, which includes a set of objects (polygons) of different nature, such as forest plants, roads, lakes etc. Each object is homogeneous. I have to write a program for mapping the dynamic of fire contour on the map. I’m going to use Rothermel’s model, because I have all input data for this model. But this model is good for homogeneous terrain, but my terrain is heterogeneous. I’m looking for the information, how Rothermel’s model can be adjusted to solve my task. Can anyone help me with the information on this question? Maybe there are other models, appropriate for programming... I would be grateful for any help.

    Marina Zharikova

    Dear Pete,

    Thank you very much for your answer. I'm familiar with Mark Finney's papers connected with fire risk assessment. I took them as a basis for my own research in this field.

  • Pranjal Singh added an answer:
    How to model Areolar (loose connective) tissue?

    Hi, how can I make an estimate of Young's modulus and poission's ratio for modelling areolar tissue as elastic material?

    I know that it is a hyperelastic material. In case that data is available, can someone kindly tell where can I find it?

    Thank you.

    Pranjal Singh

    Thank you. Very helpful.

  • Mohammad Ganje added an answer:
    How can I model release of capsulated bioactive compounds in beverages fortification?

    I want use of nanoencapsulated limonene in beverages for fortification and then modelling release of that bioactive compounds in time-temperature treatments. I want suitable methods for modelling of this phenomena.

    Previously I used fuzzy logic, artificial neural network, response surface methodology and mathematical modelling for other researches, can I use this modelling methods in this study too?

    Thanks a lot

    Mohammad Ganje

    thanks alot dear Luis Estrada-Flores

  • Marianne Levon Shahsuvaryan added an answer:
    Prodromic and early Alzheimer´s disease detection using MRI...What do you think?
    Creating a mathematical model of the brain changes across time from the evolution of 116 anatomical structures from more than 2100 MRI studies of Alzheimer´s disease patients (CDR=0.5) and healthy subjects showing the possibility of an early detection of this disease since it is possible to describe the neurodegenerative pattern.
    Marianne Levon Shahsuvaryan

    A Culture–Brain Link: Negative Age Stereotypes Predict Alzheimer’s Disease Biomarkers.

    Levy, Becca R.; Ferrucci, Luigi; Zonderman, Alan B.; Slade, Martin D.; Troncoso, Juan; Resnick, Susan M.

    Psychology and Aging, Dec 7 , 2015, No Pagination Specified.


    Although negative age stereotypes have been found to predict adverse outcomes among older individuals, it was unknown whether the influence of stereotypes extends to brain changes associated with Alzheimer’s disease. To consider this possibility, we drew on dementia-free participants, in the Baltimore Longitudinal Study of Aging, whose age stereotypes were assessed decades before yearly magnetic resonance images and brain autopsies were performed. Those holding more-negative age stereotypes earlier in life had significantly steeper hippocampal-volume loss and significantly greater accumulation of neurofibrillary tangles and amyloid plaques, adjusting for relevant covariates. These findings suggest a new pathway to identifying mechanisms and potential interventions related to the pathology of Alzheimer’s disease. (PsycINFO Database Record (c) 2015 APA, all rights reserved)

  • Yves Matanga added an answer:
    Is There a Mathematical Model of a Plastic/Adaptive Humain Brain?

    I am working on Brain Computer Interface and would like to ask the scientific community if there is an existing mathematical model that can simulate neural adatation of the brain more importantly for application in Sensorimotor rythms based Brain Computer Interface.

    Your Input will be of great help.


    Yves Matanga

    Thank you Loopinder Sood,

    I will have check on the links you have provided.

    Thank you for these ressources.

  • Somayeh Shiri added an answer:
    What is the most reliable package for c++ which calculates eigen vectors?
    I need to calculate the left eigen vector of a Eigen a good package?
    Somayeh Shiri


    I've started using the Eigen.  I was wondering if it is possible to find the left eigenvector corresponding to the largest eigenvalue of a matrix? Thanks

  • Closed account added an answer:
    Can anyone help with a Particle Swarm Optimization algorithm?
    Can anyone help me with a PSO algorithm? Is there any c/c++ programme available?

    Can anyone help me with a PSO algorithm? Mainly in c++. Thank you :)

  • Srikanth Kavirayani added an answer:
    Can we write requirements through Simulink Specification Models? If so, can they be used as inputs to Simulink design models?

    Models are considered as requirements.  A new set of models known as specification models in Simulink by mathworks are introduced. My question is can we use these specification models as requirements rather than having requirements in the form of text. 

    Srikanth Kavirayani

    It is may be easier to script the requirements as a configuration file and load the variables to workspace and then proceed to simulink.

  • Arash Nobari added an answer:
    Defining Poisson distribution via GAMS software?

    I would appreciate it if anyone could help me with this problem of mine, I have a random variable N which is following Poisson distribution and another Variable named M which is calculated based on other things and I know it is being calculated correctly cause I solved the example by hand. The problem is the part where GAMS wants to calculate the probability of N

    The CODE:

    *Number of emergency patients arriving at time period t on day d
    Table N(t,d)
    1 2
    1 1 1
    2 1 1
    3 1 1;

    file emp / '' /;put emp '* problem %gams.i%'/;
    randvar N(1,1) poisson Ltotal
    randvar N(2,1) poisson Ltotal
    randvar N(3,1) poisson Ltotal
    randvar N(1,2) poisson Ltotal
    randvar N(2,2) poisson Ltotal
    randvar N(3,2) poisson Ltotal

    put "randvar N(1,1) poisson Ltotal", N('1','1')/;
    put "randvar N(2,1) poisson Ltotal", N('2','1')/;
    put "randvar N(3,1) poisson Ltotal", N('3','1')/;
    put "randvar N(1,2) poisson Ltotal", N('1','2')/;
    put "randvar N(2,2) poisson Ltotal", N('2','2')/;
    put "randvar N(3,2) poisson Ltotal", N('3','2')/;

    file emp1 / '' /;put emp '* problem %gams.i%'/;
    chance (N(t,d)<=M(t,d)) Re(t,d)

    Arash Nobari

    Dear Changtong,

    I really appreciate that. Your comment and sent file are really useful but the main problem is in calculating cumulative distribution function of Poisson variable not generating a random variate with Poisson distribution. 

    I wrote the following code too to calculate the CDF of a Poisson variable (P(N<M)) but I get the Unknown symbol error for M which is a variable that has been calculated from some other things in my model. 


    *Re(t,d)=Reliability of accepting emergency patients arriving at time period t on day d

    $funclibin stolib stodclib
    function cdfpoisson /stolib.CDFPoisson/;

  • Hosein Rahnama added an answer:
    Does the following problem have an exact closed form solution?

    Consider a rectangular elastic isotropic clamped plate with Kirchhoff-Love theory. Does the vibration modes of this plate have any exact closed form solution?
    The mathematical formulation of the problem is in the attached picture.

    Hosein Rahnama

    Dear Marcus

    Thanks for the references. I am just looking for exact closed form solution not an approximate one. I knew that this problem has many approximate closed form solutions by Ritz and Galerkin methods.

  • Miguel A F Sanjuán added an answer:
    Why do ordinary differential equation (ODE) models of cancer suggest different behaviors for cancer cells?

    For validation part of my study, I need a comparison between my model of ductal carcinoma in situ (DCIS) and ODE models of this area. But, I’m really confused because ordinary differential equation (ODE) models of cancer have suggested different behaviors for tumor and immune cell populations. For example, the below behaviors are reported by the survey of Eftimie et al. (2011) [1]:

    • Tumor size decreases exponentially through interactions with the immune cells.
    • Tumor size decreases at first. Then, the decay of immune cells leads to an exponentially increase in it again.
    • Tumor size decays in an oscillatory manner.
    • Tumor size grows in an oscillatory manner.

    I don’t understand the reason of the difference! And, I don’t know which behavior is right. Could anyone possibly help me, please?


    [1] Eftimie, Raluca, Jonathan L. Bramson, and David JD Earn. "Interactions between the immune system and cancer: a brief review of non-spatial mathematical models." Bulletin of Mathematical Biology 73.1 (2011): 2-32.

    Miguel A F Sanjuán

    I agree with Joseph Malinzi. It might depend on the chosen parameters to obtain a different behavior of course, and certainly you can use a logistic or Gompertz growth term in your model equation, but as Dr. Malinzi says, this has nothing to do with the interaction with the T cells.

  • Hamid Moa added an answer:
    How to model mathematically plate and shell structural damage subject to blast and explosion loading?

    I find some paper for this topic in low-velocity dynamic loading on stiffened plate(like as grounding of ship bottom hull),but can not find in high-velocity range like explosion(internal or external). all of this re souls are in experimental or numerical method. How to model mathematically plate and shell structural damage subject to blast and explosion loading?

    Hamid Moa

    beat regard SAM

  • Rafael Gontijo added an answer:
    How is the evolution of contact between the asperities of two contacting bodies?

    Our team is studying the problem of thermal contact resistance which depends on the contact between asperities. We are trying to capture the transient phase before a steady state is reached. So we are interested in results of analytical or numerical or experimental investigations into the deformation of asperities just after the contact is established and until the final contact patch is formed. Geometry or material of the two bodies is no constraint. Thanks.

    Rafael Gontijo

    In a very interesting problem in the field of fluid mechanics, published in the Journal of Fluid Mechanics studied the problem of two approaching spheres with different asperities. The contact between these rough particles induced a hydrodynamic diffusive coefficient. Maybe you could find some interesting references there. Here is the link of this manuscript:

About Mathematical Modelling

Everything about mathematical modelling.

Topic followers (6,354) See all