Commit 8a7376ae authored by Olivier Lantsoght's avatar Olivier Lantsoght

[Example] Update user model source file of examples

parent 5e3b7528
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -46,18 +46,20 @@ void mbs_delete_user_model(UserModel* um)
int ind;
int ind_state_value = 1;
um->lin_struct.New_Parameter = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->lin_struct.New_Parameter = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
for(ind=0; ind<mbs_infos->user_models->user_model_list[1]->parameter_list[0]->n_value; ind++)
for(ind=1; ind<=mbs_infos->user_models->user_model_list[1]->parameter_list[0]->n_value; ind++)
{
um->lqr.K[ind+1] = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[ind];
um->lqr.K[ind] = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[ind];
}
um->lqr.process = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->lqr.process = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[1];
}
void mbs_bind_user_model(MbsInfos* mbs_infos, UserModel* um)
{
mbs_infos->user_models->user_model_list[0]->parameter_list[0]->val_ptr = um->lin_struct.ss;
mbs_infos->user_models->user_model_list[0]->parameter_list[1]->val_ptr = um->lin_struct.lpk;
mbs_infos->user_models->user_model_list[0]->parameter_list[2]->val_ptr = &um->lin_struct.New_Parameter;
mbs_infos->user_models->user_model_list[1]->parameter_list[0]->val_ptr = um->lqr.K;
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Tue Jul 30 08:59:36 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -16,6 +16,8 @@
#define USERMODEL_h
#include "mbs_statespace_struct.h"
#include "mbs_linearipk_struct.h"
#include "mbs_user_interface.h"
// ============================================================ //
......@@ -24,6 +26,8 @@
struct UserModel
{
struct lin_struct{
MbsSS* ss; // pointer must be initialized and freed by the user
MbsLpk* lpk; // pointer must be initialized and freed by the user
double New_Parameter;
} lin_struct;
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -41,8 +41,8 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->Bushing.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->Bushing.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->Bushing.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->Bushing.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -58,26 +58,26 @@ void mbs_delete_user_model(UserModel* um)
int ind;
int ind_state_value = 1;
um->Suspension.Z0 = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->Suspension.Z0 = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
for(ind=0; ind<mbs_infos->user_models->user_model_list[1]->parameter_list[0]->n_value; ind++)
for(ind=1; ind<=mbs_infos->user_models->user_model_list[1]->parameter_list[0]->n_value; ind++)
{
um->Pneumatic.states[ind+1] = ind_state_value;
um->Pneumatic.states[ind] = ind_state_value;
ind_state_value++;
}
um->Pneumatic.Vc0 = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->Pneumatic.Ae0 = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[0];
um->Pneumatic.Vr = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[0];
um->Pneumatic.Lt = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[0];
um->Pneumatic.dt = mbs_infos->user_models->user_model_list[1]->parameter_list[5]->value_list[0];
um->Pneumatic.gamma = mbs_infos->user_models->user_model_list[1]->parameter_list[6]->value_list[0];
um->Pneumatic.R = mbs_infos->user_models->user_model_list[1]->parameter_list[7]->value_list[0];
um->Pneumatic.p0 = mbs_infos->user_models->user_model_list[1]->parameter_list[8]->value_list[0];
um->Pneumatic.pa = mbs_infos->user_models->user_model_list[1]->parameter_list[9]->value_list[0];
um->Pneumatic.Ta = mbs_infos->user_models->user_model_list[1]->parameter_list[10]->value_list[0];
um->Pneumatic.lambda = mbs_infos->user_models->user_model_list[1]->parameter_list[11]->value_list[0];
um->Pneumatic.xsi = mbs_infos->user_models->user_model_list[1]->parameter_list[12]->value_list[0];
um->Pneumatic.dAedz = mbs_infos->user_models->user_model_list[1]->parameter_list[13]->value_list[0];
um->Pneumatic.Vc0 = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[1];
um->Pneumatic.Ae0 = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[1];
um->Pneumatic.Vr = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[1];
um->Pneumatic.Lt = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[1];
um->Pneumatic.dt = mbs_infos->user_models->user_model_list[1]->parameter_list[5]->value_list[1];
um->Pneumatic.gamma = mbs_infos->user_models->user_model_list[1]->parameter_list[6]->value_list[1];
um->Pneumatic.R = mbs_infos->user_models->user_model_list[1]->parameter_list[7]->value_list[1];
um->Pneumatic.p0 = mbs_infos->user_models->user_model_list[1]->parameter_list[8]->value_list[1];
um->Pneumatic.pa = mbs_infos->user_models->user_model_list[1]->parameter_list[9]->value_list[1];
um->Pneumatic.Ta = mbs_infos->user_models->user_model_list[1]->parameter_list[10]->value_list[1];
um->Pneumatic.lambda = mbs_infos->user_models->user_model_list[1]->parameter_list[11]->value_list[1];
um->Pneumatic.xsi = mbs_infos->user_models->user_model_list[1]->parameter_list[12]->value_list[1];
um->Pneumatic.dAedz = mbs_infos->user_models->user_model_list[1]->parameter_list[13]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -56,22 +56,22 @@ void mbs_delete_user_model(UserModel* um)
int ind;
int ind_state_value = 1;
um->Spring.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->Spring.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->Spring.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->mylink.Z0 = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[0];
um->Motor.Un = mbs_infos->user_models->user_model_list[2]->parameter_list[0]->value_list[0];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[2]->parameter_list[1]->value_list[0];
um->Motor.kphi = mbs_infos->user_models->user_model_list[2]->parameter_list[2]->value_list[0];
um->Motor.L = mbs_infos->user_models->user_model_list[2]->parameter_list[3]->value_list[0];
um->Motor.rho = mbs_infos->user_models->user_model_list[2]->parameter_list[4]->value_list[0];
for(ind=0; ind<mbs_infos->user_models->user_model_list[2]->parameter_list[5]->n_value; ind++)
um->Spring.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->Spring.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->Spring.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
um->mylink.K = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[1];
um->mylink.Z0 = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[1];
um->Motor.Un = mbs_infos->user_models->user_model_list[2]->parameter_list[0]->value_list[1];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[2]->parameter_list[1]->value_list[1];
um->Motor.kphi = mbs_infos->user_models->user_model_list[2]->parameter_list[2]->value_list[1];
um->Motor.L = mbs_infos->user_models->user_model_list[2]->parameter_list[3]->value_list[1];
um->Motor.rho = mbs_infos->user_models->user_model_list[2]->parameter_list[4]->value_list[1];
for(ind=1; ind<=mbs_infos->user_models->user_model_list[2]->parameter_list[5]->n_value; ind++)
{
um->Motor.i[ind+1] = ind_state_value;
um->Motor.i[ind] = ind_state_value;
ind_state_value++;
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -52,18 +52,18 @@ void mbs_delete_user_model(UserModel* um)
int ind;
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
um->Motor.rho = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[0];
um->Motor.U = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[0];
um->Motor.Kphi = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[0];
um->Motor.L = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[0];
for(ind=0; ind<mbs_infos->user_models->user_model_list[1]->parameter_list[5]->n_value; ind++)
um->Motor.rho = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[1];
um->Motor.U = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[1];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[1];
um->Motor.Kphi = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[1];
um->Motor.L = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[1];
for(ind=1; ind<=mbs_infos->user_models->user_model_list[1]->parameter_list[5]->n_value; ind++)
{
um->Motor.i[ind+1] = ind_state_value;
um->Motor.i[ind] = ind_state_value;
ind_state_value++;
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.Z0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.Z0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:46 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -44,6 +44,8 @@ void mbs_delete_user_model(UserModel* um)
void mbs_bind_user_model(MbsInfos* mbs_infos, UserModel* um)
{
mbs_infos->user_models->user_model_list[0]->parameter_list[0]->val_ptr = um->lin_struct.ss;
mbs_infos->user_models->user_model_list[0]->parameter_list[1]->val_ptr = um->lin_struct.lpk;
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Tue Jul 30 08:59:36 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -16,6 +16,8 @@
#define USERMODEL_h
#include "mbs_statespace_struct.h"
#include "mbs_linearipk_struct.h"
#include "mbs_user_interface.h"
// ============================================================ //
......@@ -24,6 +26,8 @@
struct UserModel
{
struct lin_struct{
MbsSS* ss; // pointer must be initialized and freed by the user
MbsLpk* lpk; // pointer must be initialized and freed by the user
} lin_struct;
};
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -52,18 +52,18 @@ void mbs_delete_user_model(UserModel* um)
int ind;
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
um->Motor.rho = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[0];
um->Motor.U = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[0];
um->Motor.Kphi = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[0];
um->Motor.L = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[0];
for(ind=0; ind<mbs_infos->user_models->user_model_list[1]->parameter_list[5]->n_value; ind++)
um->Motor.rho = mbs_infos->user_models->user_model_list[1]->parameter_list[0]->value_list[1];
um->Motor.U = mbs_infos->user_models->user_model_list[1]->parameter_list[1]->value_list[1];
um->Motor.Rmot = mbs_infos->user_models->user_model_list[1]->parameter_list[2]->value_list[1];
um->Motor.Kphi = mbs_infos->user_models->user_model_list[1]->parameter_list[3]->value_list[1];
um->Motor.L = mbs_infos->user_models->user_model_list[1]->parameter_list[4]->value_list[1];
for(ind=1; ind<=mbs_infos->user_models->user_model_list[1]->parameter_list[5]->n_value; ind++)
{
um->Motor.i[ind+1] = ind_state_value;
um->Motor.i[ind] = ind_state_value;
ind_state_value++;
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Aug 28 17:50:47 2019
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -42,9 +42,9 @@ void mbs_delete_user_model(UserModel* um)
{
int ind_state_value = 1;
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->mylink.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->mylink.C = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->mylink.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
}
......
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Oct 3 09:38:15 2018
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -34,5 +34,12 @@ void mbs_delete_user_IO(UserIO *uio)
free(uio);
}
void mbs_get_user_IO_size(int *n_in, int *n_out, int *n_user_IO)
{
*n_in = 0;
*n_out = 0;
*n_user_IO = 0;
}
// ============================================================ //
......@@ -8,7 +8,7 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Oct 3 09:38:15 2018
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
......@@ -55,10 +55,10 @@
#define IN_9_37 0.1
// body point
#define DPT_1_1 -0.1
#define DPT_1_1 -0.02
#define DPT_2_1 -0.35
#define DPT_3_1 0.2
#define DPT_1_2 -0.1
#define DPT_1_2 -0.02
#define DPT_2_2 0.35
#define DPT_3_2 0.2
#define DPT_2_3 0.35
......@@ -94,12 +94,14 @@
#define DPT_2_17 -0.2
#define DPT_1_18 -0.1
#define DPT_3_18 -0.1
#define DPT_3_19 -0.223
#define DPT_1_19 0.02
#define DPT_3_19 -0.2
#define DPT_3_20 -0.1
#define DPT_2_22 0.4
#define DPT_1_23 0.1
#define DPT_2_23 0.2
#define DPT_3_24 -0.223
#define DPT_1_24 0.02
#define DPT_3_24 -0.2
#define DPT_3_25 -0.1
#define DPT_1_26 -0.1
#define DPT_3_26 -0.1
......
......@@ -8,13 +8,13 @@
*
* Universite catholique de Louvain, Belgium
*
* Last update : Wed Oct 3 09:38:15 2018
* Last update : Fri Apr 10 16:29:39 2020
* --------------------------------------------------------
*
*/
#include "mbs_path.h"
#include "user_model.h"
#include "mbs_xml_reader.h"
#include "mbs_xml_binder_public.h"
#include "mbs_load_xml.h"
#include "useful_functions.h"
#include "math.h"
......@@ -53,57 +53,54 @@ void mbs_delete_user_model(UserModel* um)
free(um);
}
void mbs_load_user_model_xml(MDS_gen_strct* gen, UserModel* um)
void mbs_load_user_model_xml(MbsInfos* mbs_infos, UserModel* um)
{
int ind;
int ind_state_value = 1;
um->FrontSuspension.K = gen->user_models->user_model_list[0]->parameter_list[0]->value_list[0];
um->FrontSuspension.D = gen->user_models->user_model_list[0]->parameter_list[1]->value_list[0];
um->FrontSuspension.L0 = gen->user_models->user_model_list[0]->parameter_list[2]->value_list[0];
um->FrontSuspension.C_bar = gen->user_models->user_model_list[0]->parameter_list[3]->value_list[0];
um->FrontSuspension.K = mbs_infos->user_models->user_model_list[0]->parameter_list[0]->value_list[1];
um->FrontSuspension.D = mbs_infos->user_models->user_model_list[0]->parameter_list[1]->value_list[1];
um->FrontSuspension.L0 = mbs_infos->user_models->user_model_list[0]->parameter_list[2]->value_list[1];
um->FrontSuspension.C_bar = mbs_infos->user_models->user_model_list[0]->parameter_list[3]->value_list[1];
um->RearSuspension.K = gen->user_models->user_model_list[1]->parameter_list[0]->value_list[0];
um->RearSuspension.D = gen->user_models->user_model_list[1]->parameter_list[1]->value_list[0];
um->RearSuspension.L0 = gen->user_models->user_model_list[1]->parameter_list[2]->value_list[0];
um->RearSuspension.C_bar = gen->user_models->user_model_list[1]->parameter_list[3]->value_list[