This repository has been archived on 2026-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Operations-Research-Tool/src/app/modules.tsx
T
SinusFox e8d29783c6 Adding results and export (#19)
* Initial Push

Inititial project state

* Static demo version

* static demo site - added variables

a

* first_implementation

* Updated UI, Improved Style to be more "Reactly", added Functionality

* add parsing functions

* change folder

* Import/Export Prototype

* Adding "reactjs-popup" to package,json

* Adding GLPK source

* Rough implementation of solver + example

* Show solution in output

* example 2 + popup lib

* removing import button

This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose.

* Removing "Popout" button

This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose.

* Updating Logs

Now the site displays all logs created with customLog(STRING). Logs can be cleared with customLogClear();

* Adding walltime

Can be called using:

Start:
function walltimeStart() {
returns Date.now();

Stop:
function walltimeStopAndPrint(startpoint: number) {
Add startpoint as argument.
It prints the elapsed time using customLog()

* Adding duals ouput

* Adding glpk.js package

required dependency

* adding LP format export and fixing a few errors

* fixing further errors

* adding automatic build

* Moving files to correct folders

* Update nextjs.yml

---------

Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com>
Co-authored-by: moebiusl <lucas.moebius@icloud.com>
Co-authored-by: Marcel Pöppe <marcel.poeppe@gmail.com>
2024-10-03 23:00:32 +02:00

51 lines
1.1 KiB
TypeScript

import { MouseEventHandler } from "react";
import React from 'react';
import Popup from "reactjs-popup";
export function Box({title, placeholder, id}:
{title:string; placeholder:string; id:string}) {
return(
<div className="main_div">
<div className="body_title">
{title}
</div>
<div className="text">
<textarea
className="body_box"
id={id}
wrap="soft"
rows={6}
placeholder={placeholder}
></textarea>
</div>
</div>
);
}
export function Button({title, className, onClickFunc}:
{title:string; className:string|undefined; onClickFunc: MouseEventHandler}) {
return(
<button
className={className}
onClick={onClickFunc}
>
{title}
</button>
);
}
export function Output({ id, text }: { id: string; text: string }) {
return (
<div className="main_div">
<div className="body_title">Output</div>
<div className="text">
<p className="output_box" id={id}>
{text}
</p>
</div>
</div>
);
}